This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
laravel new projectname && | |
composer require laravel/telescope --dev && | |
composer require barryvdh/laravel-debugbar --dev && | |
php artisan telescope:install && | |
php artisan telescope:publish && | |
php artisan migrate && | |
php artisan telescope:publish && | |
composer require spatie/laravel-activitylog && | |
php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" && | |
php artisan migrate && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Route::get('/', function (\Illuminate\Http\Request $request) { | |
$initialSearch = $request->query('search', ''); | |
$userQuery = User::query() | |
->when($request->filled('search'),function($query) use ($initialSearch){ | |
$query->where('name','LIKE','%'.$initialSearch.'%') | |
->orWhere('email','LIKE','%'.$initialSearch.'%'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Merge; | |
class Marge | |
{ | |
protected $data = []; | |
public function setData($data) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<ul class="flex pl-0 list-none rounded my-2"> | |
<li | |
class="relative block py-2 px-3 leading-tight bg-white border border-gray-300 text-blue-700 border-r-0 ml-0 rounded-l hover:bg-gray-200" | |
v-if="previousPageUrl" | |
> | |
<InertiaLink | |
:href="previousPageUrl" | |
class="page-link" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class SingletonModel extends Model | |
{ | |
protected function store($data = []) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Traits; | |
use Illuminate\Support\Str; | |
trait HasFilters | |
{ | |
public function scopeFilter($query, $filters = []) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Rules; | |
use Illuminate\Support\Str; | |
use Illuminate\Contracts\Validation\Rule; | |
class LimitNumberOfItemsRule implements Rule | |
{ | |
/** @var array */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Alpine.js Todo Demo</title> | |
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet"> | |
<script src="https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.js" defer></script> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tailwindcss/ui@latest/dist/tailwind-ui.min.css"> | |
<meta charset="utf-8"> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Charts; | |
use App\Support\Livewire\ChartComponentData; | |
use ConsoleTVs\Charts\Classes\Chartjs\Chart; | |
/** | |
* Class WanSpeedTestsChart | |
* |