I used a custom directive to implement this, but essentially:
<div wire:new-like="loadLikes">
</div>
<?php | |
namespace Src\Csv; | |
use Illuminate\Http\Response; | |
use Symfony\Component\HttpFoundation\StreamedResponse; | |
/** | |
* Class DownloadLargeCsv | |
* |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
Other people's projects:
My projects (tutorials are on my blog at http://maxoffsky.com):
opendb () { | |
[ ! -f .env ] && { echo "No .env file found."; exit 1; } | |
DB_CONNECTION=$(grep DB_CONNECTION .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
DB_HOST=$(grep DB_HOST .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
DB_PORT=$(grep DB_PORT .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
DB_DATABASE=$(grep DB_DATABASE .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
DB_USERNAME=$(grep DB_USERNAME .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) | |
DB_PASSWORD=$(grep DB_PASSWORD .env | grep -v -e '^\s*#' | cut -d '=' -f 2-) |
A curated list of amazingly awesome PHP libraries, resources and shiny things.
Please see CONTRIBUTING, CODE-OF-CONDUCT and COLLABORATING for details.
<?php | |
use Illuminate\Support\Str; | |
use App\Libraries\RDStationApi; | |
use Illuminate\Support\Debug\Dumper; | |
Form::macro('dateField', function ($name, $label = NULL, $value = NULL, $attributes = []) { | |
$element = '<div class="datepicker-input input-group date">'; | |
$element .= Form::text($name, $value ? $value : old($name), field_attributes($name, array_merge($attributes, ['data-input' => 'date']))); | |
$element .= '<span class="input-group-addon">'; |
<?php | |
namespace App\Traits; | |
use Illuminate\Database\Eloquent\Builder; | |
trait HasStatus | |
{ | |
public static function bootHasStatus() | |
{ | |
$status_column = (new static)->getStatusColumnName(); |
<?php | |
namespace App\Traits; | |
trait FullTextSearch | |
{ | |
/** | |
* Replaces spaces with full text search wildcards | |
* | |
* @param string $term |
<?php | |
use Illuminate\Database\Query\Builder; | |
/** | |
* Trait MatchableTrait | |
* Author : Gael Debost | |
* Add a very basic match method to an Eloquent Model. Based on a SQL MATCH | |
* You need FULL TEXT Indexes in order to match fields. Somes rules : |