Skip to content

Instantly share code, notes, and snippets.

subdirectory/vendor/laravel/telescope/src/TelescopeApplicationServiceProvider.php

  use Illuminate\Support\Facades\View;
  ...
    public function boot()
    {
      View::composer(['telescope::layout'], function ($view) { $view->with('telescopeScriptVariables', [ 'path' => 'subdirectory/public/telescope', 'timezone' => config('app.timezone'), 'recording' => ! cache('telescope:pause-recording'), ]); });
      $this->authorization();
    }
 ...
  cd /project/dir
  #docker login 
  docker build -t registry.gitlab.com/<USERNAME>/<FOLDER>/<PROJECT>:latest .
  docker push registry.gitlab.com/<USERNAME>/<FOLDER>/<PROJECT>:latest

Front

  • Acunetix
  • Sitemap
  • Robots.txt
  • SEO
  • Google Page Speed
  • Meta tags
  • Lazyload
  • Canonicals
  • w3org Validate
app/Providers/AppServiceProviders.php
  use Illuminate\Support\ServiceProvider;
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\URL;
  
  /* ... */
  
 public function boot(Request $request) {
curl http://192.168.98.1:8090/login.xml --data "mode=191&username=guest&password=guest&producttype=2"

Episode 11 - Routing Conventions Worth Following

Resourceful Routing - Sample Resource

HTTP Verb (GET, POST) - How to interact with resource (/samples)

routes\web.php

  // GET /samples (index)
  // GET /samples/create (create)
# create "feature-branch" then commit code to it
# replace "feature-branch" with whatever you decide the branch name would be
# if you're ready to push/merge follow the following steps

git fetch
git checkout feature-branch
git rebase origin/dev
git checkout dev
git pull

Episode 6 - Controllers 101

routes\web.php

Route::get('/', 'PagesController@home');
Route::get('/about', 'PagesController@about');
Route::get('/contact', 'PagesController@contact');