This has been moved to my blog at asklagbox blog
We are going to make a quick laravel application, including the setup and install.
We will setup the project using the following:
- Nginx
- sqlite3
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Bootstrap any application services. |
<?php | |
namespace App\Http\Middleware; | |
use Lang; | |
use Closure; | |
class AuthCheck | |
{ | |
/** |
<?php | |
namespace Illuminate\Routing; | |
use Illuminate\Support\Str; | |
class ResourceRegistrar | |
{ | |
protected static $wildcardMap = []; |
<?php | |
/* | |
Model trait | |
Uses: | |
Model::getDates() // to not search dates | |
Model::getHidden() // to not search hidden fields | |
Optional: | |
var $searchable = [] // set which fields you want searchable | |
var $unsearchable = [] // set which fields should be unsearchable |
<?php | |
public function register($name, $controller, array $options = []) | |
{ | |
... | |
// We need to extract the base resource from the resource name. Nested resources | |
// are supported in the framework, but we need to know what name to use for a | |
// place-holder on the route parameters, which should be the base resources. | |
$base = $this->getResourceWildcard(last(explode('.', $name))); |
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Bootstrap any application services. |
<?php | |
namespace App\Http; | |
use Illuminate\Pipeline\Pipeline; | |
use Illuminate\Support\Facades\Facade; | |
use Illuminate\Foundation\Http\Kernel as HttpKernel; | |
class Kernel extends HttpKernel | |
{ |
# Description: | |
# Language based greetings, and laravenewbie nick change welcome message | |
# | |
# Commands: | |
# hubot show greeting for {language} | |
# hubot I speak {language} | |
# hubot forget my greeting | |
# hubot what is my greeting | |
# hubot greeting | |
# hubot list languages |
# | |
# data structure | |
# { | |
# key: ..., | |
# expires_at: ..., | |
# ... | |
# } | |
# | |
class CacheBrain |
This has been moved to my blog at asklagbox blog
We are going to make a quick laravel application, including the setup and install.
We will setup the project using the following: