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
My notes for upgrading laragon to work with latest apache and php8.1 | |
Update to laragon 5: | |
- Stop all running services in laragon | |
- Make sure laragon itself is properly closed | |
- Download the latest laragon.exe and overwrite your original laragon.exe | |
https://github.com/leokhoa/laragon/releases/download/5.0.0/laragon.exe | |
Update to latest apache | |
- Download the latest apache 2.4 VS16 for windows (Apache 2.4.x OpenSSL 1.1.1 VS16): |
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
https://www.youtube.com/watch?v=zlz3OtI1n9w&list=PLksJKA0gKBYyY6g7xJ85Ylx4J3LrCPGoC |
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
[{"name":"Afghanistan","flag":"🇦🇫","code":"AF","dial_code":"+93"},{"name":"Åland Islands","flag":"🇦🇽","code":"AX","dial_code":"+358"},{"name":"Albania","flag":"🇦🇱","code":"AL","dial_code":"+355"},{"name":"Algeria","flag":"🇩🇿","code":"DZ","dial_code":"+213"},{"name":"American Samoa","flag":"🇦🇸","code":"AS","dial_code":"+1684"},{"name":"Andorra","flag":"🇦🇩","code":"AD","dial_code":"+376"},{"name":"Angola","flag":"🇦🇴","code":"AO","dial_code":"+244"},{"name":"Anguilla","flag":"🇦🇮","code":"AI","dial_code":"+1264"},{"name":"Antarctica","flag":"🇦🇶","code":"AQ","dial_code":"+672"},{"name":"Antigua and Barbuda","flag":"🇦🇬","code":"AG","dial_code":"+1268"},{"name":"Argentina","flag":"🇦🇷","code":"AR","dial_code":"+54"},{"name":"Armenia","flag":"🇦🇲","code":"AM","dial_code":"+374"},{"name":"Aruba","flag":"🇦🇼","code":"AW","dial_code":"+297"},{"name":"Australia","flag":"🇦🇺","code":"AU","dial_code":"+61"},{"name":"Austria","flag":"🇦🇹","code":"AT","dial_code":"+43"},{"name":"Azerbaijan","flag":"🇦🇿","code":"AZ","dial_code":"+9 |
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
composer create-project --prefer-dist laravel/laravel <project_name> | |
composer require garygreen/pretty-routes predis/predis laravel/telescope tymon/jwt-auth mxl/laravel-job laravel/helpers | |
composer require --dev styde/enlighten |
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
// cy.seed(...) to call a seeder from api | |
Cypress.Commands.add('seed', (seeder) => { | |
// here you will notice that we namespaced our seeders for e2e tests | |
cy.request('GET', Cypress.config().apiUrl + 'seed?seeder=' + 'Seeds\\E2E\\' + seeder) | |
}) | |
// routes/web.php | |
if (app()->environment() !== 'production') { | |
Route::get('/seed', function ($model) { | |
\Artisan::call('db:seed', ['--class' => request('seeder')]); |
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
<q-table | |
:data="data" | |
:pagination="pagination" | |
@request="paginationRequest" | |
:columns="columns" | |
> | |
<template v-slot:top-left="props"> | |
<TablePagination | |
:pagination="props.pagination" | |
:filter="table.filter" |
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 | |
function varexport($expression, $return=FALSE) { | |
$export = var_export($expression, TRUE); | |
$export = preg_replace("/^([ ]*)(.*)/m", '$1$1$2', $export); | |
$array = preg_split("/\r\n|\n|\r/", $export); | |
$array = preg_replace(["/\s*array\s\($/", "/\)(,)?$/", "/\s=>\s$/"], [NULL, ']$1', ' => ['], $array); | |
$export = join(PHP_EOL, array_filter(["["] + $array)); | |
if ((bool)$return) return $export; else echo $export; | |
} |
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\Http\Controllers; | |
use Illuminate\Http\Request; | |
use App\Services\Paginator\Paginator; | |
use Illuminate\Database\QueryException; | |
use Illuminate\Validation\ValidationException; | |
abstract class BaseCrudController extends Controller |
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 // File location: /wp-content/themes/my-theme/src/Models/ | |
namespace App\Models; | |
use Illuminate\Database\Eloquent\Model as Eloquent; | |
class Car extends Eloquent | |
{ | |
protected $table = 'cars'; | |
protected $primaryId = 'id'; |
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
import axios from 'axios' | |
export default class Cancellable { | |
constructor(cancelMessage) { | |
this.cancelMessage = cancelMessage | |
this.cancelToken = null | |
} | |
axios(fn) { | |
if (this.cancelToken) { |
NewerOlder