The Laravel Framework.

Overview

Build Status Total Downloads Latest Stable Version License

About Laravel

Note: This repository contains the core code of the Laravel framework. If you want to build an application using Laravel, visit the main Laravel repository.

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as:

Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb combination of simplicity, elegance, and innovation gives you a complete toolset required to build any application with which you are tasked.

Learning Laravel

Laravel has the most extensive and thorough documentation and video tutorial library of any modern web application framework. The Laravel documentation is in-depth and complete, making it a breeze to get started learning the framework.

If you're not in the mood to read, Laracasts contains over 1100 video tutorials covering a range of topics including Laravel, modern PHP, unit testing, JavaScript, and more. Boost the skill level of yourself and your entire team by digging into our comprehensive video library.

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

The Laravel framework is open-sourced software licensed under the MIT license.

Comments
  • Return collection from the query builder

    Return collection from the query builder

    This issue was created to get community feedback.


    It would be awesome if we could have the query builder return a collection:

    $collection = DB::table('posts')->get();
    

    Given that PHP in some situations infamously does not treat ArrayAccess objects as arrays, this would be breaking BC. This will obviously be targeted for the next release of Laravel.

    Pros

    1. Makes it consistent with Eloquent. You'll find countless questions on StackOverflow asking why some collection method can't be called on a query builder result.
    2. It's just much cleaner than this: collect(DB::table('posts')->get()). Laravel prides itself on making all these tiny interactions more enjoyable. This should not be any different.
    3. Native PHP arrays are just useless :smile:

    Cons

    1. It's a breaking change. Some people's tests might fail because they're using array_* or typehinting for an array. If their code can't be updated to use a collection, they'll have to append ->all() to their results.

    If people don't have good test coverage, they'll have to search their codebase for ->get( and manually tack on ->all() wherever necessary. Not the end of the world, but definitely a breaking change.


    Overall I think this change is well worth it and would love some feedback from the community. If you use the query builder directly, please leave a comment below with your thoughts either way, or if I missed any pros/cons.

    Thank you :heart:

    opened by JosephSilber 176
  • Coding Style Proposal

    Coding Style Proposal

    This has been floating around for a long time, so let's put this in writing here.

    I propose Laravel does one of the 3 following things:

    1. Moves totally to symfony's coding style (possibility without yoda comparisons).
    2. Moves to PSR-2 with symfony style (PSR-5) docblocks.
    ~~3. Moves to PSR-2 with allman style braces.~~ Rejected

    NB, I vote for number 1. NB, we could still do number 1 without yoda style comparisons if needed.


    EDIT:

    Reading through the comments, it's 100% certain that we should at least move to full PSR-2, and a lot of people seem to like the idea of moving to symfony in the interest of consistency, but without yoda comparisons. Moving without yoda conditions is the only way at the moment anyway since we currently have no automated way to enforce them.

    opened by GrahamCampbell 139
  • [5.3]

    [5.3] "TokenMismatchException in VerifyCsrfToken.php" in Laravel's auth form

    I use fresh installation of Laravel 5.3. I did the following steps in my Homestead:

    laravel new blog php artisan make:auth entered proper database configuration in .env php artisan migrate

    That's all I did. Everything wen smoothly but when I submit register form I get: TokenMismatchException in VerifyCsrfToken.php line 67:

    I tried to clean cache and cookies, use different browsers and install Laravel again (also via composer). Some people from Laravel's IRC Chat also confirm that bug too.

    opened by MountainDev 129
  • [5.2] Update column created_at,  updated_at

    [5.2] Update column created_at, updated_at

    Hello. When working with Elokuent that it updates column created_at, updated_at both when creating and updating.

    When creating this is true, but why update created_at column every time I do something it updated? In this case, it makes use of a useless $tablet->timestamps(); because you can not fix the field of creating records

    Say it is a bug or by design?

    or tell me how to leave the field after creating created_at intact?

    opened by PheRum 117
  • [5.1] [5.2] Error handler hides PHPUnit errors

    [5.1] [5.2] Error handler hides PHPUnit errors

    I discovered a bug in PHPUnit (https://github.com/sebastianbergmann/phpunit/issues/1935) while working on a Laravel 5.1 project:

    $ composer create-project laravel/laravel --prefer-dist
    
    $ cd laravel
    
    $ ./vendor/bin/phpunit --coverage-html /does-not-exist
    PHPUnit 4.8.16 by Sebastian Bergmann and contributors.
    
    .
    
    Time: 429 ms, Memory: 18.75Mb
    
    OK (1 test, 2 assertions)
    
    Generating code coverage report in HTML format ...PHP Fatal error:  Uncaught exception 'Illuminate\Contracts\Container\BindingResolutionException' with message 'Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable.' in /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:745
    Stack trace:
    #0 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(627): Illuminate\Container\Container->build('Illuminate\\Cont...', Array)
    #1 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('Illuminate\\Cont...', Array)
    #2 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(154): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
    #3 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(79): Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler()
    #4 [internal function]: Illuminate\Foundation\Bootstrap\Handle in /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 745
    PHP Fatal error:  Uncaught exception 'Illuminate\Contracts\Container\BindingResolutionException' with message 'Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable.' in /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:745
    Stack trace:
    #0 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(627): Illuminate\Container\Container->build('Illuminate\\Cont...', Array)
    #1 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('Illuminate\\Cont...', Array)
    #2 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(154): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
    #3 /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(79): Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler()
    #4 /home/sb/test/laravel/vendor/laravel/framework/src/Illumina in /home/sb/test/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 745
    

    The reason why I am opening this ticket is because nowhere in the stacktrace do I see PHPUnit and/or PHP_CodeCoverage. The fact that PHPUnit was not handling an exception raised by PHP_CodeCoverage was not apparent at all from looking at the error I got. Maybe the error handler is too eager?

    bug 
    opened by sebastianbergmann 95
  • [5.4] SQL error when migrating tables

    [5.4] SQL error when migrating tables

    • Laravel Version: 5.4.0
    • PHP Version: 7.0.12
    • Database Driver & Version: MySQL 5.6.33

    Description:

    When I create a new 5.4 project and try to migrate the database tables, I get this SQL error :

    [Illuminate\Database\QueryException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table users add unique users_email_unique(email))

    I get this error when running php artisan migrate on a fresh install on a Macbook, on my Windows computer I get the same error except it says that the max length is 1000 bytes instead of 767 bytes.

    Steps To Reproduce:

    • Create a new project (laravel new project, with installer 1.3.3)
    • cd into the project
    • Fill in the database information in the .env file
    • Run php artisan migrate
    opened by Demers94 88
  • Eloquent should support composite keys

    Eloquent should support composite keys

    Eloquent assumes heavily that you are using surrogate keys on your tables (the id field in every table). However in real world usage, particularly older database systems not designed with web frameworks in mind, there are often tables with composite keys. That is, the primary key is over two or more columns. Often, you can't just add autoincremented id's. This is definitely a game stopper for a lot of use-cases, where you are forced to access existing RDBMS (e.g. building a frontend for an existing db). See also this reddit post about this issue.

    The schema builder has already support for composite keys, however eloquent doesn't seem to support it yet.

    I request the feature to use composite keys in your eloquent models and queries. The default configuration for surrogate keys is fine, just add the option.

    opened by aebersold 84
  • Change

    Change "Facade" to "Surrogate"

    This backwards-compatible change removes the word "Facade" in class names and comments in favor of the word "Surrogate." All current tests pass.

    The word "Facade" implies the facade pattern, but the implementation is closer to a proxy pattern. The word "Surrogate", on the other hand, implies something closer to the existing behavior (i.e., a static proxy call to a container instance).

    The method names (get|set)Facade(Accessor|Application) remain in place. Changing them requires changing the related abstract class (Surrogate, née Facade). Because userland code may be extending the abstract class, that would require the userland code to be changed as well. That is not a backwards-compatible approach. Thus, the method names remain as a historical artifact. Future versions should deprecate and/or rename these methods to remove the word Facade.

    Per https://github.com/laravel/framework#contributing: Since this is a rename/replace of an existing behavior, and not a new component, this pull request is against the latest stable release. Please provide specific instructions if another approach is preferable.

    opened by pmjones 82
  • [Bug] Schema builder - renameColumn fails on table with enum columns

    [Bug] Schema builder - renameColumn fails on table with enum columns

    Example code:

    Schema::create('presentations', function($table)
    {
    ...
        $table->enum('repeat_unit', array('DAY', 'WEEK', 'MONTH', 'YEAR'))->default('DAY');
    ...
    });
    
    Schema::table('presentations', function($table)
    {
        $table->renameColumn('created', 'created_at');
    });
    

    Result:

    [Doctrine\DBAL\DBALException] Unknown database type enum requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.

    opened by itsgoingd 82
  • [5.7] Allow Gates / Policies To Accept

    [5.7] Allow Gates / Policies To Accept "Guests"

    This PR allows gates and policies to allow "guest users" (null) to be passed to them instead of automatically returning false. They can allow this by marking their user type-hint as optional or providing a null default value for the incoming user:

    $gate->define('foo', function (?User $user) {
        return true;
    });
    

    The same convention can be used for policy methods as well as before and after callbacks.

    opened by taylorotwell 79
  • whereHas() not working with MorphTo()

    whereHas() not working with MorphTo()

    The whereHas() method for querying a polymorphic relationship doesn't seem to be working.

    Here are the relationships:

    Transaction.php
    
    public function transactionable()
        {
            return $this->morphTo('transactionable');
        }
    
    Reservation.php
    
    public function transactions()
        {
            return $this->morphMany('Transaction', 'transactionable');
        }
    
    Project.php
    
    public function transactions()
        {
            return $this->morphMany('Transaction', 'transactionable');
        }
    

    And here is what I am trying to do:

    return Transaction::whereHas('transactionable', function($q){
            return $q->where('id', '=', '1');
        })->get();
    

    Result:

    SQLSTATE[42S22]: Column not found: 1054 Unknown column 'transactions.' in 'where clause' (SQL: select * from `transactions` where (select count(*) from `transactions` where `transactions`.`transactionable_id` = `transactions`.`` and `id` = 1) >= 1)
    

    Is this possible?

    bug 
    opened by nkeena 77
  • configure native redis clustering results in error message

    configure native redis clustering results in error message

    • Laravel Version: 9.44.0
    • PHP Version: 8.1.12
    • Database Driver & Version: phpredis (5.3.7 installed by pecl)

    Description: configure native redis clustering results in error message

    Steps To Reproduce:

    Make sure to config database.php like this:

    ` 'redis' => [

        'client' => env('REDIS_CLIENT', 'phpredis'),
    
        'options' => [
            'cluster' => env('REDIS_CLUSTER', 'redis'),
        ],
    
        'clusters' => [
            'default' => [
                'url' => env('REDIS_URL'),
                'host' => env('REDIS_HOST', '127.0.0.1'),
                'username' => env('REDIS_USERNAME'),
                'password' => env('REDIS_PASSWORD'),
                'port' => env('REDIS_PORT', '6379'),
                'database' => env('REDIS_DB', '0'),
            ],
    
            'cache' => [
                'url' => env('REDIS_URL'),
                'host' => env('REDIS_HOST', '127.0.0.1'),
                'username' => env('REDIS_USERNAME'),
                'password' => env('REDIS_PASSWORD'),
                'port' => env('REDIS_PORT', '6379'),
                'database' => env('REDIS_CACHE_DB', '0'),
            ],
            'session' => [
                'url' => env('REDIS_URL'),
                'host' => env('REDIS_HOST', '127.0.0.1'),
                'username' => env('REDIS_USERNAME'),
                'password' => env('REDIS_PASSWORD'),
                'port' => env('REDIS_PORT', '6379'),
                'database' => env('REDIS_CACHE_DB', '0'),
                'prefix'    => 's:'
            ],
    
        ],
    ],`
    

    Env values (only relevant, skipped queue details f.e.):

      - REDIS_HOST=redis-node-5
      - SESSION_DRIVER=redis
      - SESSION_CONNECTION=session
    

    I'm revceiving the following error message when trying to call default laravel mainpage

    array_key_exists(): Argument #2 ($array) must be of type array, null given

    Same goes for queue worker (on startup), including more readable details:

    `root@36f9e34e9915:/var/www/html# php artisan queue:Work

    INFO Processing jobs from the [{default}] queue.

    [2023-01-09 10:18:34] local.ERROR: array_key_exists(): Argument #2 ($array) must be of type array, null given {"exception":"[object] (TypeError(code: 0): array_key_exists(): Argument #2 ($array) must be of type array, null given at /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php:177) [stacktrace] #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(177): array_key_exists('url', NULL) #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(275): Illuminate\Support\Arr::exists(NULL, 'url') #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(599): Illuminate\Support\Arr::forget(NULL, Array) #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/ConfigurationUrlParser.php(36): Illuminate\Support\Arr::pull(NULL, 'url') #4 /var/www/html/vendor/laravel/framework/src/Illuminate/Redis/RedisManager.php(186): Illuminate\Support\ConfigurationUrlParser->parseConfiguration(NULL) #5 /var/www/html/vendor/laravel/framework/src/Illuminate/Redis/RedisManager.php(133): Illuminate\Redis\RedisManager->parseConnectionConfiguration(NULL) #6 [internal function]: Illuminate\Redis\RedisManager->Illuminate\Redis\{closure}(NULL) [...redacted] "}

    TypeError

    array_key_exists(): Argument #2 ($array) must be of type array, null given

    at vendor/laravel/framework/src/Illuminate/Collections/Arr.php:177 173▕ if (is_float($key)) { 174▕ $key = (string) $key; 175▕ } 176▕ ➜ 177▕ return array_key_exists($key, $array); 178▕ } 179▕ 180▕ /** 181▕ * Return the first element in an array passing a given truth test.

      +6 vendor frames 
    

    7 [internal]:0 Illuminate\Redis\RedisManager::Illuminate\Redis{closure}()

      +23 vendor frames 
    

    31 artisan:37 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))`

    Please let me know if more information is required. -Thanks for help and all of the work on laravel.

    opened by some0ne2 0
  • Eloquent WithDefault not mapped on firstOrNew / FirstOrCreate / UpdateOrCreate

    Eloquent WithDefault not mapped on firstOrNew / FirstOrCreate / UpdateOrCreate

    • Laravel Version: 9.43.0
    • PHP Version: 8.1.8
    • Database Driver & Version: MySQL 8

    Description:

    Laravel has the options of withDefault on a relation eg:

    public function settlement(): HasOne
        {
            return $this->hasOne(Contact::class)->where('type', ContactTypeEnum::Settlement)->withDefault([
                'type' => ContactTypeEnum::Settlement
            ]);
        }
    

    Would be nice to have the defaults run through when calling for example in a magic helper we currently have:

     protected function processHasOneRelation(HasOne $relation, array $collection,  void
       {
    
           $relatedRecord = $relation->firstOrNew();
    
           if( $relatedRecord->exists() === false){
               $defaults = $relation->getResults();
               if($defaults){
                   $relatedRecord->fill($defaults->toArray());
               }
           }
           $relatedRecord->fill($collection)->save();
       }
    

    due to the getDefaultFor method being protected, it is not accessible in our helper.

    Steps To Reproduce:

    opened by phpsa 0
  • [9.x] Add `setVisible` and `setHidden` to Eloquent Collection

    [9.x] Add `setVisible` and `setHidden` to Eloquent Collection

    This PR adds setVisible and setHidden methods to Eloquent Collections.

    We already have the makeVisible and makeHidden methods, but makeVisible is only useful when a property is usually hidden or when the model has a non-empty $visible property, and makeHidden is only useful when you want to be explicit about what is excluded, not what is included.

    Example:

    I want to return an array of users with just the ID and name, hiding other attributes such as email and any future attributes that may be added.

    // This is effectively a no-op because these fields are not typically hidden.
    $users->makeVisible(['id', 'name'])->toArray(); ❌
    /*
    [
        [
            'id' => 1,
            'name' => 'Test User',
            'email' => '[email protected]'
        ]
    ]
    */
    
    // This only gives us the desired result until a new non-hidden attribute is added to the model.
    $users->makeHidden(['email'])->toArray(); 😐️
    /*
    [
        [
            'id' => 1,
            'name' => 'Test User',
        ]
    ]
    */
    
    // This allows us to be explicit about the data we want, and it won't leak as new attributes are added to the model.
    $users->setVisible(['id', 'name'])->toArray(); ✅
    /*
    [
        [
            'id' => 1,
            'name' => 'Test User',
        ]
    ]
    */
    

    This is especially useful when passing collections to Inertia.

    opened by jessarcher 0
  • [9.x] Customize maintenance exception

    [9.x] Customize maintenance exception

    That PR allows to customize maintenance exception by implementing public function abort(array $data): void; in PreventRequestsDuringMaintenance.php.

    Like this, the exception could mastered by developper and if customized the response could be too (add headers, choose view etc..) without risk to break the complete middleware logic.

    My exception implementation to illustrate

    <?php
    
    namespace Exceptions;
    
    use Illuminate\Http\Request;
    use Illuminate\Support\Facades\Log;
    use Inertia\Inertia;
    use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException as ParentHttpException;
    
    final class ServiceUnavailableHttpException extends ParentHttpException
    {
        public function __construct(
            private Request $request,
            array $headers,
            string $message = 'Service Unavailable',
            \Throwable $previous = null
        ) {
            parent::__construct($headers['Retry-After'], $message, $previous, 503, $headers);
        }
    
        public function report()
        {
            Log::channel('info')->log($this->getMessage(), $this->context());
        }
    
        public function render()
        {
            $seconds = $this->getHeaders()['Retry-After'];
    
            return Inertia::render('Errors/503', [
                'message' => trans('exception.service_unavailable', [
                    'seconds' => $seconds,
                    'minutes' => ceil($seconds / 60),
                ]),
            ])
                ->toResponse($this->request)
                ->setStatusCode($this->getStatusCode())
                ->withHeaders($this->getHeaders());
        }
    
        public function context()
        {
            return [
                'sessions.id' => $this->request->session()->getId(),
            ];
        }
    }
    
    
    opened by abenevaut 0
  • [10.x] Add ability to reindex the chunks using collection chunk method

    [10.x] Add ability to reindex the chunks using collection chunk method

    Fixes #29685

    This PR adds an option to collection's chunk method to reindex the chunks numerically or preserve the keys, just like PHP array_chunk method.

    Before this PR:

    collect([1, 2, 3, 4, 5, 6, 7])->chunk(3)->toArray();
    // [[1, 2, 3], [3 => 4, 4 => 5, 5 => 6], [6 => 7]]
    

    After this PR:

    collect([1, 2, 3, 4, 5, 6, 7])->chunk(3, false)->toArray();
    // [[1, 2, 3], [4, 5, 6], [7]]
    
    collect([1, 2, 3, 4, 5, 6, 7])->chunk(3)->toArray();
    // [[1, 2, 3], [3 => 4, 4 => 5, 5 => 6], [6 => 7]]
    
    opened by hafezdivandari 0
Releases(v9.46.0)
  • v9.46.0(Jan 3, 2023)

    Added

    • Added Passthrough PATH variable to serve command (#45402)
    • Added whenHas to JsonResource (#45376)
    • Added ./fleet directory to .gitignore (#45432)
    • Added unless to JsonResource (#45419)

    Fixed

    • Fixed credentials check (#45437)
    • Fixed decimal cast precision issue (#45456, #45492)
    • Precognitive validation with nested arrays doesn't throw validation error (#45405)
    • Fixed issue on which class to check increment and decrement methods for custom cast (#45444)

    Changed

    • Update decimal validation rule to allow validation of signed numbers (24a48b2)
    • Output only unique asset / preload tags in Vite (#45404)
    • Optimize whereKey method in Query Builder (#45453)
    • Remove extra code in Model.php to optimize performance (#45476)
    • Exception Handler prepareResponse add previous Exception (#45499)
    Source code(tar.gz)
    Source code(zip)
  • v9.45.1(Dec 27, 2022)

  • v9.45.0(Dec 20, 2022)

    Added

    • Allows the registration of custom, root-level anonymous component search paths. (#45338, 1ff0379)
    • Added decimal validation rule (#45356, e89b2b0)
    • Added align property to button mail component (#45362)
    • Added whereUlid(param) support for routing (#45372)

    Fixed

    • Fixed single line @php statements to not be parsed as php blocks in BladeCompiler (#45333)
    • Added missing code to set locale from model preferred locale in Maillable (#45308)

    Changed

    • Vite: ability to prevent preload tag generation from attribute resolver callback (#45283)
    • Deprecation Test Improvements (#45317)
    • Do not allow nested arrays in whereIn method (140c3a8)
    • Bump ramsey/uuid (#45367)
    Source code(tar.gz)
    Source code(zip)
  • v9.44.0(Dec 18, 2022)

    Added

    • Added Illuminate/Auth/GuardHelpers::forgetUser() (#45208)
    • Added sort option for schedule:list (#45198)
    • Added ascii and ulid validation rules (#45218)
    • Http client - allow to provide closure as "throwif" condition (#45251)
    • Support '/' as a possible column name in database (#45268)
    • Added Granular notifications queue connections (#45264)
    • Add support for native rename/drop column commands (#45258)
    • Add $encoding parameter to substr method (#45300)
    • Use Macroable in Session facade (#45310)

    Fixed

    • Fixed aliasing with cursor pagination (#45188)
    • Fixed email verification request (#45227)
    • Return 500 http error, instead of 200, when dotenv fails to load (#45235)
    • Fixed bug on Job Batchs Table (#45263)
    • Fixed schedule:list crash when call() is given class-string (#45306)
    • Fixed Lack of Memory when failing a job with wrong variable passed on the method fail() (#45291)
    • Fixed errors occurring when encrypted cookies has been tampered with (#45313)
    • bug fix, change array_merge to array_replace to prevent reindex (#45309)

    Changed

    • Allow BusFake to use custom BusRepository (#45202)
    • Improved error logging for unmatched routes and route not found (#45206)
    • Improve assertSeeText and assertDontSeeText test methods (#45274)
    • Improved Illuminate/Auth/SessionGuard::clearUserDataFromStorage() (#45305)
    • Allows shouldIgnoresDeprecationError() to be overriden (#45299)
    Source code(tar.gz)
    Source code(zip)
  • v8.83.27(Dec 18, 2022)

  • v9.43.0(Dec 6, 2022)

    Added

    • Add support for eager loading specific columns to withWhereHas (#45168)
    • Add Policies to Model Show Command (#45153)
    • Added Illuminate/Support/Stringable::whenIsUlid() (#45183)

    Fixed

    • Added missing reserved names in GeneratorCommand (#45149)

    Changed

    • Allow to pass base64 key to env:encrypt command (#45157)
    • Replace model:show searched value with correct FQCN (#45160)
    Source code(tar.gz)
    Source code(zip)
  • v9.42.2(Dec 6, 2022)

  • v9.42.1(Dec 6, 2022)

    Revert

    • Revert "[9.x] Create new Json ParameterBag Instance when cloning Request" (#45147)

    Fixed

    • Mailable : fixes strict comparison with int value (#45138)
    • Address Dynamic Relation Resolver inconsiency issue with extended Models (#45122)
    Source code(tar.gz)
    Source code(zip)
  • v9.42.0(Nov 29, 2022)

    Added

    • Added --rest option to queue:listen (00a12e2, 82fde9e)
    • Added Illuminate/Support/Stringable::isUlid() (#45100)
    • Add news report_if and report_unless helpers functions (#45093)
    • Add callback to resolve custom mutex name of schedule events (#45126)
    • Add WorkOptions to WorkerStopping Event (#45120)
    • Added singleton and creatable options to Illuminate/Routing/Console/ControllerMakeCommand (#44872)

    Fixed

    • Fix pure enums validation (#45121)
    • Prevent test issues with relations with the $touches property (#45118)
    • Fix factory breaking when trying to determine whether a relation is empty (#45135)

    Changed

    • Allow set command description via AsCommand attribute (#45117)
    • Updated Mailable to prevent duplicated recipients (#45119)
    Source code(tar.gz)
    Source code(zip)
  • v9.41.0(Nov 22, 2022)

    Added

    • Added Illuminate/Validation/Rules/DatabaseRule::onlyTrashed() (#44989)
    • Add some class rules in class Rule (#44998)
    • Added Illuminate/View/ComponentAttributeBag::missing() (#45016)
    • Added Illuminate/Http/Concerns/InteractsWithInput::whenMissing() (#45019)
    • Add isolation levels to SQL Server Connector (#45023)
    • Fix php artisan serve with PHP_CLI_SERVER_WORKERS > 1 (#45041)
    • Add ability to prune cancelled job batches (#45034)
    • Adding option for custom manifest filename on Vite Facade (#45007)

    Fixed

    • Fix deprecation warning when comparing a password against a NULL database password (#44986, 206e465)
    • Outlook web dark mode email layout fix (#45024)

    Changed

    • Improves queue:work command output (#44971)
    • Optimize Collection::containsStrict (#44970)
    • Make name required in Illuminate/Testing/TestResponse::assertRedirectToRoute() (98a0301)
    • Strip key, secret and token from root config options on aws clients (#44979)
    • Allow customised implementation of the SendQueuedMailable job (#45040)
    • Validate uuid before route binding query (#44945)
    Source code(tar.gz)
    Source code(zip)
  • v9.40.1(Nov 15, 2022)

  • v9.40.0(Nov 15, 2022)

    Added

    • Include Eloquent Model Observers in model:show command (#44884)
    • Added "lowercase" validation rule (#44883)
    • Introduce Lottery class (#44894)
    • Added /Illuminate/Testing/TestResponse::assertRedirectToRoute() (#44926)
    • Add uppercase validation rule (#44918)
    • Added saveManyQuietly to the hasOneOrMany and belongsToMany relations (#44913)

    Fixed

    • Fix HasAttributes::getMutatedAttributes for classes with constructor args (#44829)

    Changed

    • Remove argument assignment for console (#44888)
    • Pass $maxExceptions from mailable to underlying job when queuing (#44903)
    • Make Vite::isRunningHot public (#44900)
    • Add method to be able to override the exception context format (#44895)
    • Add zero-width space to trimmed characters in TrimStrings middleware (#44906)
    • Show error if key:generate artisan command fails (#44927)
    • Update database version check for lock popping for PlanetScale (#44925)
    • Move function withoutTrashed into DatabaseRule (#44938)
    • Use write connection on Schema::getColumnListing() and Schema::hasTable() for MySQL and PostgreSQL (#44946)
    Source code(tar.gz)
    Source code(zip)
  • v9.39.0(Nov 8, 2022)

    Added

    • Added template fragments to Blade (#44774)
    • Added source file to Collection's dd method output (#44793, d2e0e85)
    • Added Illuminate/Support/Testing/Fakes/PendingBatchFake::dispatchAfterResponse() (#44815)
    • Added Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase::assertDatabaseEmpty() (#44810)

    Fixed

    • Fixed InteractsWithContainer::withoutMix() (#44822)

    Changed

    • Update UpCommand::handle that must return int (#44807)
    • Decouple database component from console component (#44798)
    • Improve input argument parsing for commands (#44662, #44826)
    • Added DatabaseBatchRepository to provides() in BusServiceProvider (#44833)
    • Move reusable onNotSuccessfulTest functionality to TestResponse (#44827)
    • Add CSP nonce to Vite reactRefresh inline script (#44816)
    • Allow route group method to be chained (#44825)
    • Remove __sleep() & __wakeup() from SerializesModels trait. (#44847)
    • Handle SQLite without ENABLE_DBSTAT_VTAB enabled in Illuminate/Database/Console/DatabaseInspectionCommand::getSqliteTableSize() (#44867)
    • Apply force flag when necessary in Illuminate/Queue/Listener (#44862)
    • De-couple Console component from framework (#44864)
    • Update Vite mock to return empty array for preloadedAssets (#44858)
    Source code(tar.gz)
    Source code(zip)
  • v9.38.0(Nov 1, 2022)

    Added

    • Added Illuminate/Routing/Route::flushController() (#44393)
    • Added Illuminate/Session/Store::setHandler() (#44736)
    • Added dictionary to slug helper (#44730)
    • Added ability to set middleware based on notifiable instance and channel (#44767)
    • Added touchQuietly convenience method to Model (#44722)
    • Added Illuminate/Routing/Router::removeMiddlewareFromGroup() (#44780)
    • Allow queueable notifications to set maxExceptions (#44773)
    • Make migrate command isolated (#44743, ac3252a)

    Fixed

    • Fixed whenPivotLoaded(As) api resource methods when using Eloquent strict mode (#44792)
    • Fixed components view error when using $attributes in parent view (#44778)
    • Fixed problem with disregarding global scopes when using existOr and doesntExistOr methods on model query (#44795)

    Changed

    • Recompiles views when necessary (#44737)
    • Throw meaningful exception when broadcast connection not configured (#44745)
    • Prevents booting of providers when running env:encrypt (#44758)
    • Added nonce for preloaded assets (#44747)
    • Inherit crossorigin attributes while preloading view (#44800)
    Source code(tar.gz)
    Source code(zip)
  • v8.83.26(Nov 1, 2022)

  • v9.37.0(Oct 25, 2022)

    Added

    • Added optional verbose output when view caching (#44673)
    • Allow passing closure to rescue $report parameter (#44710)
    • Support preloading assets with Vite (#44096)
    • Added Illuminate/Mail/Mailables/Content::htmlString() (#44703)

    Fixed

    • Fixed model:show registering getAttribute() as a null accessor (#44683)
    • Fix expectations for output assertions in PendingCommand (#44723)
    Source code(tar.gz)
    Source code(zip)
  • v9.36.4(Nov 1, 2022)

    Added

    • Added rawValue to Database Query Builder (and Eloquent as wrapper) (#44631)
    • Added TransactionCommitting (#44608)
    • Added dontIncludeSource to CliDumper and HtmlDumper (#44623)
    • Added Illuminate/Filesystem/FilesystemAdapter::checksum() (#44660)
    • Added handlers for silently discarded and missing attribute violations (#44664)

    Reverted

    Changed

    • Create new Json ParameterBag Instance when cloning Request (#44671)
    • Prevents booting providers when running env:decrypt (#44654)
    Source code(tar.gz)
    Source code(zip)
  • v9.36.3(Oct 25, 2022)

    Reverted

    • Reverts micro-optimization on view events (#44653)

    Fixed

    • Fixes blade not forgetting compiled views on view:clear (#44643)
    • Fixed Illuminate/Database/Eloquent/Model::offsetExists() (#44642)
    • Forget component's cache and factory between tests (#44648)

    Changed

    • Bump Testbench dependencies (#44651)
    Source code(tar.gz)
    Source code(zip)
  • v9.36.2(Oct 25, 2022)

  • v9.36.1(Oct 18, 2022)

  • v9.36.0(Oct 18, 2022)

    Added

    • Added mailable assertions (#44563)
    • Added Illuminate/Testing/TestResponse::assertContent() (#44580)
    • Added to Illuminate/Console/Concerns/InteractsWithIO::alert() $verbosity param (#44614)

    Optimization

    • Makes blade components blazing fast (#44487)

    Fixed

    • Fixed Illuminate/Filesystem/Filesystem::relativeLink() (#44519)
    • Fixed for model:show failing with models that have null timestamp columns (#44576)
    • Allow Model::shouldBeStrict(false) to disable "strict mode" (#44627)

    Changed

    • Dont require a host for sqlite connections in php artisan db (#44585)
    • Let MustVerifyEmail to be used on models without id as primary key (#44613)
    • Changed Illuminate/Routing/Route::controllerMiddleware() (#44590)
    Source code(tar.gz)
    Source code(zip)
  • v9.35.1(Oct 11, 2022)

  • v9.35.0(Oct 11, 2022)

    Added

    • Allow loading trashed models for resource routes (#44405)
    • Added Illuminate/Database/Eloquent/Model::shouldBeStrict() and other (#44283)
    • Controller middleware without resolving controller (#44516)
    • Alternative Mailable Syntax (#44462)

    Fixed

    • Fix issue with aggregates (withSum, etc.) for pivot columns on self-referencing many-to-many relations (#44286)
    • Fixes issue using static class properties as blade attributes (#44473)
    • Traversable should have priority over JsonSerializable in EnumerateValues (#44456)
    • Fixed make:cast --inbound so it's a boolean option, not value (#44505)

    Changed

    • Testing methods. Making error messages with json_encode more readable (#44397)
    • Have 'Model::withoutTimestamps()' return the callback's return value (#44457)
    • only load trashed models on relevant routes (#44478)
    • Adding additional PHP extensions to shouldBlockPhpUpload Function (#44512)
    • Register cutInternals casters for particularly noisy objects (#44514)
    • Use get methods to access application locale (#44521)
    • return only on non empty response from channels (09d53ee, 3944a3e)
    • Correct channel matching (#44531)
    • Migrate mail components (#44527)
    Source code(tar.gz)
    Source code(zip)
  • v9.34.0(Oct 4, 2022)

    Added

    • Short attribute syntax for Self Closing Blade Components (#44413)
    • Adds support for PHP's BackedEnum to be "rendered" on blade views (#44445)

    Fixed

    • Fixed Precognition headers for Symfony responses (#44424)
    • Allow to create databases with dots (#44436)
    • Fixes dd source on windows (#44451)

    Changed

    • Adds error output to db command when missing host (#44394)
    • Changed Illuminate/Database/Schema/ForeignIdColumnDefinition::constrained() (#44425)
    • Allow maintenance mode events to be listened to in closure based listeners (#44417)
    • Allow factories to recycle multiple models of a given typ (#44328)
    • Improves dd clickable link on multiple editors and docker environments (#44406)
    Source code(tar.gz)
    Source code(zip)
  • v9.33.0(Oct 4, 2022)

    Added

    • Added Illuminate/Support/Testing/Fakes/MailFake::cc() (#44319)
    • Added Ignore Case of Str::contains and Str::containsAll to Stringable contains and containsAll (#44369)
    • Added missing morphs methods for the ULID support (#44364)
    • Introduce Laravel Precognition (#44339)
    • Added Illuminate/Routing/Route::flushController() (#44386)

    Fixed

    • Fixes memory leak on PHPUnit's Annotations registry (#44324, #44336)
    • Fixed Illuminate/Filesystem/FilesystemAdapter::url() with config prefix (#44330)
    • Fixed the "Implicit conversion from float to int loses precision" error in Timebox Class (#44357)

    Changed

    • Improves dd source on compiled views (#44347)
    • Only prints source on dd calls from dump.php (#44367)
    • Ensures a Carbon version that supports PHP 8.2 (#44374)
    Source code(tar.gz)
    Source code(zip)
  • v8.83.25(Oct 4, 2022)

  • v9.32.0(Sep 27, 2022)

    Added

    • New env:encrypt and env:decrypt commands (#44034)
    • Share WithoutOverlapping key across jobs (#44227)
    • Add missing citext type mapping to Illuminate/Database/Console/DatabaseInspectionCommand::$typeMappings (#44237)
    • Short attribute syntax for Blade Components (#44217)
    • Adds source file to dd function output (#44211)
    • Add methods to get request data as integer or float (#44239)
    • Adds Eloquent User Provider query handler (#44226)
    • Added Illuminate/Support/Testing/Fakes/BusFake::dispatchFakeBatch() (#44176)
    • Added methods to cast Stringables (#44238)
    • Added Illuminate/Routing/UrlGenerator::withKeyResolver() (#44254)
    • Add a hook to the serialisation of collections (#44272)
    • Allow enum route bindings to have default values (#44255)
    • Added benchmark utility class (b4293d7, #44297)
    • Added Illuminate/Console/Scheduling/ManagesFrequencies::everyOddHour() (#44288)

    Fixed

    • Fix incrementing string keys (#44247)
    • Fix bug in Fluent Class with named arguments in migrations (#44251)
    • Fix "about" command caching report (#44305)
    • Fixes memory leaks (#44306, #44307)

    Changed

    • Patch for timeless timing attack vulnerability in user login (#44069)
    • Refactor: register commands in artisan service (#44257)
    • Allow factories to recycle models with for method (#44265)
    • Use dedicated method for placeholder replacement in validator (#44296)
    Source code(tar.gz)
    Source code(zip)
  • v8.83.24(Sep 27, 2022)

  • v9.31.0(Sep 20, 2022)

    Added

    • Added unique deferrable initially deferred constants for PostgreSQL (#44127)
    • Request lifecycle duration handler (#44122)
    • Added Model::withoutTimestamps(...) (#44138)
    • Added manifestHash function to Illuminate\Foundation\Vite (#44136)
    • Added support for operator <=> in /Illuminate/Collections/Traits/EnumeratesValues::operatorForWhere() (#44154)
    • Added that Illuminate/Database/Connection::registerDoctrineType() can accept object as well as classname for new doctrine type (#44149)
    • Added Fake Batches (#44104, #44173)
    • Added Model::getAppends() (#44180)
    • Added missing Str::wrap() static method (#44207)
    • Added require symfony/uid (#44202)
    • Make Vite macroable (#44198)

    Fixed

    • Async fix in Illuminate/Http/Client/PendingRequest (#44179)
    • Fixes artisan serve command with PHP_CLI_SERVER_WORKERS environment variable (#44204)
    • Fixed InteractsWithDatabase::castAsJson($value) incorrectly handles SQLite Database (#44196)

    Changed

    • Improve Blade compilation exception messages (#44134)
    • Improve test failure output (#43943)
    • Prompt to create MySQL db when migrating (#44153)
    • Improve UUID and ULID support for Eloquent (#44146)
    Source code(tar.gz)
    Source code(zip)
  • v9.30.1(Sep 27, 2022)

    Added

    • Allow using a model instance in place of nested model factories (#44107)
    • Added UUID and ULID support for Eloquent (#44074)
    • Implement except method for fake classes to define what should not be faked (#44117)
    • Added interacts with queue middleware to send queued mailable (#44124)
    • Added new exception string to Illuminate/Database/DetectsLostConnections (#44121)

    Fixed

    Changed

    • Enhance column modifying (#44101)
    • Allow to define which jobs should be actually dispatched when using Bus::fake (#44106)
    Source code(tar.gz)
    Source code(zip)
Owner
The Laravel Framework
The Laravel Framework
User to Team associations with invitation system for the Laravel 5 Framework

Teamwork This package supports Laravel 6 and above. Teamwork is the fastest and easiest method to add a User / Team association with Invites to your L

Marcel Pociot 983 Jan 2, 2023
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.

A full-stack framework for Laravel that takes the pain out of building dynamic UIs.

Livewire 17.7k Jan 1, 2023
Your users do not always report errors, LaraBug does. LaraBug is a simple to use and implement error tracker built for the Laravel framework.

Your users do not always report errors, LaraBug does. LaraBug is a simple to use and implement error tracker built for the Laravel framework. This rep

LaraBug 197 Dec 9, 2022
JSON-RPC 2.0 API server for @Laravel framework

Sajya is an open-source project aiming to implement the JSON-RPC 2.0 server specification for the Laravel quickly.

Sajya 179 Dec 29, 2022
Stapler-based file upload package for the Laravel framework.

laravel-stapler Laravel-Stapler is a Stapler-based file upload package for the Laravel framework. It provides a full set of Laravel commands, a migrat

Code Sleeve 565 Dec 9, 2022
SSLCommerz Payment gateway library for Laravel framework

SSLCommerz SSLCommerz Payment gateway library for Laravel framework. Official documentation is here. install composer require sam-asif/sslcommerz Pro

Md. Asif Iqbal 1 Oct 28, 2021
OpenShift QuickStart - Laravel 5.0 Framework

Laravel 5.0 on OpenShift Laravel is a free, open source PHP web application framework, designed for the development of model–view–controller (MVC) web

Jacob Lucky 52 Nov 21, 2022
Extend Laravel PHP framework to make working with Aiven databases simpler

Aiven Commands for Laravel ✨ Add some Aiven magic to your Laravel project ✨ This Laravel package provides some aiven commands for artisan to help with

Aiven 8 Aug 19, 2022
Sistema Imobiliário utilizando o Framework PHP Laravel

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Pedro Leandro 1 Jan 11, 2022
Get started using SELCOM APIs with Laravel framework

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Bruno 2 Jan 13, 2022
Use Blade templates without the full Laravel framework

blade Use Laravel Blade templates as a standalone component without the full Laravel framework Full documentation is available at http://duncan3dc.git

Craig Duncan 138 Dec 7, 2022
In-browser console for Laravel PHP framework.

Laravel 4 Console In-browser console for Laravel 4 PHP framework. This bundle executes your code within ConsoleController@postExecute context, and dis

null 172 Dec 30, 2022
Integrasi Payment Gateway Midtrans dengan Framework Laravel 8

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Martin Mulyo Syahidin 25 Dec 4, 2022
A simple PHP package to show SweetAlerts with the Laravel Framework

Easy Sweet Alert Messages for Laravel Installation Require the package using Composer. composer require uxweb/sweet-alert If using laravel < 5.5 inclu

Uziel Bueno 824 Jan 7, 2023
Twitter clone project being developed by using PHP Laravel Framework and tailwind.css

Twits! About Twits! We, as enthusiastic learners and new developers, kicked of this project in order to improve our skills and capabilities in PhP Lar

Furkan Meraloğlu 10 Aug 29, 2022
The Laravel Framework.

About Laravel Note: This repository contains the core code of the Laravel framework. If you want to build an application using Laravel, visit the main

The Laravel Framework 28.6k Dec 31, 2022
Self-hosted CMS platform based on the Laravel PHP Framework.

October is a Content Management System (CMS) and web platform whose sole purpose is to make your development workflow simple again. It was born out of

October CMS 10.8k Jan 1, 2023
Powerful REPL for the Laravel framework.

Introduction Laravel Tinker is a powerful REPL for the Laravel framework. Official Documentation Documentation for Tinker can be found on the Laravel

The Laravel Framework 7.1k Jan 3, 2023
Fast and simple implementation of a REST API based on the Laravel Framework, Repository Pattern, Eloquent Resources, Translatability, and Swagger.

Laravel Headless What about? This allows a fast and simple implementation of a REST API based on the Laravel Framework, Repository Pattern, Eloquent R

Julien SCHMITT 6 Dec 30, 2022