Skip to content

Instantly share code, notes, and snippets.

View Repox's full-sized avatar

Dan Storm Repox

View GitHub Profile
@Repox
Repox / validation.php
Last active May 4, 2023 10:17
Laravel Validation Language file DK
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
@Repox
Repox / A_Directory_Example.md
Last active November 11, 2023 11:59
Laravel 7 - Alternative public folder for shared hosting

The point of this Gist is to help setting up Laravel on a shared hosting setup, where you'd might need to have your ./public folder in another structure due to the hosting setup, but still keep the application itself out of the document root/public html folder.

The directory structure presented below is just an example, showing the document root/public html folder next to the Laravel application. The configurations displayed in the files below matches this structure.

Additionally, the changes in server.php allows for you to have the same directory structure when working locally with artisan serve (if you are using this).

I've added // comments in the files below on the lines where I changed any references and I've marked, in the tree structure below, where you find the files you need to update.

shared_hosting/ <- Your root directory (not document root/public html folder).
@Repox
Repox / send.php
Created April 12, 2018 06:04
Google API PHP Client - Firebase Cloud Messaging Service v1 example
<?php
/**
* This serves as an example of how to use the Google API PHP Client
* with Firebase Cloud Messaging Service.
*
* The client can be found here:
* https://github.com/google/google-api-php-client
*
* At the time of writing this, there's no Service object for the correct
@Repox
Repox / PaginationController.php
Created November 3, 2016 11:05
Laravel 5 Pagination with transform
<?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
class PaginationController extends Controller
{
@Repox
Repox / laravel
Created August 18, 2014 19:10
Laravel logrotate configuration (1 daily rotation, 7 days retention)
/home/laravel/app/storage/logs/laravel.log {
daily
missingok
rotate 7
maxage 7
compress
notifempty
create 755 user group
su user group
}