Skip to content

Instantly share code, notes, and snippets.

View ffmit's full-sized avatar
🎯
Focusing

ffmit

🎯
Focusing
View GitHub Profile
@ffmit
ffmit / bulma_laravel_starter_navigation.blade.php
Created September 6, 2019 12:16
Bulma Starter template for Laravel. Modified source from https://codepen.io/hunzaboy/pen/yoPKQW?editors=1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello MSD!</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css">
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
</head>
@ffmit
ffmit / master.blade.php
Created September 7, 2019 18:57
Contains the basics for a blade based layout master view
@include('layout.header')
@include('layout.navbar')
@yield('content')
@include('layout.footer')
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../resources/css/bulma.css">
<link rel="stylesheet" href="../../resources/css/custom.css">
<script src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
<script>
@ffmit
ffmit / laravel_plural_vs_singular
Last active September 27, 2019 07:30
Laravel - Plural vs. Singular
Model ------- Singular -- (e.g. app/Car.php)
Controller -- Singular -- (e.g. app/Http/Controllers/CarController.php)
Table ------- Plural ---- (e.g. "cars")
Factory ----- Singular -- (e.g. database/factories/CarFactory.php)
Seed -------- Plural ---- (e.g. database/seeds/CarsTableSeeder.php)
PivotTable -- Singular -- (e.g. car_dealer, for a connection between cars and dealers tables)
@ffmit
ffmit / laravel_routes_samples
Created September 30, 2019 15:33
Laravel Routes
// Named route for "About us" page which is placed in "/resources/views/other" folder
Route::get('/about', ['as' => 'about', function () {
return view('other.about');
}]);
// Resourceful route
Route::resource('entries', 'EntryController');
@ffmit
ffmit / laravel_flash_messaging.txt
Last active October 3, 2019 16:09
Laravel Flash Messaging
Please note:
Flash messages are made with Bulma (https://bulma.io)
Write in Controller
-------------------
request()->session()->flash('success', 'This is a success.');
OR
@ffmit
ffmit / laravel_todo_order
Created October 4, 2019 08:39
Laravel Todo Order
Adjust timezone via app.php to read from .env file
@ffmit
ffmit / bulma_color_palette_scheme.txt
Created October 11, 2019 11:37
bulma color palette scheme
Official Bulma colors and those which suite very nicely:
Box background for Chart.js canvas: #f6f8fa
@ffmit
ffmit / clear_laravel.txt
Created October 24, 2019 11:17
Clear all caches in Laravel
php artisan route:clear && php artisan view:clear && php artisan config:clear && php artisan cache:clear

/**

  • @param string $argument1 This is the description. */

Laravel

Pragmatic phpDoc blocks

Standard Function

/**