PHP code example of pyaesoneaung / laravel-starter-kit
1. Go to this page and download the library: Download pyaesoneaung/laravel-starter-kit library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pyaesoneaung / laravel-starter-kit example snippets
diff
use Illuminate\Database\Eloquent\Model;
class Person extends Model
{
- protected $casts = [
- 'age' => 'integer',
- ];
+ protected function casts(): array
+ {
+ return [
+ 'age' => 'integer',
+ ];
+ }
}
diff
class User extends Model
{
- public function scopeActive($query)
+ #[\Illuminate\Database\Eloquent\Attributes\Scope]
+ protected function active($query)
{
return $query->where('active', 1);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.