Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 16, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 16, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 16, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 16, 2025

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025

      Minecraft licensing robbed us of this controversial NFL schedule release video

      May 16, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      The power of generators

      May 16, 2025
      Recent

      The power of generators

      May 16, 2025

      Simplify Factory Associations with Laravel’s UseFactory Attribute

      May 16, 2025

      This Week in Laravel: React Native, PhpStorm Junie, and more

      May 16, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025
      Recent

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Artisan `make` Commands Automatically Chop `.php` Extension in Laravel 11.12

    Artisan `make` Commands Automatically Chop `.php` Extension in Laravel 11.12

    June 26, 2024

    This week, the Laravel team released v11.12, which includes a multiply collection method, automatically chopping the .php extension in make commands, and more.

    Chop PHP Extension When Passed to make Commands (v11.11.1)

    Jason McCreary contributed a nice DX feature when passing .php to make:* commands for generating files for things like controllers, events, commands, etc. Nothing changes except that Laravel now handles the .php extension behind the scenes:

    php artisan make:controller UserController.php
    # Before – app/Http/Controllers/UserController.php.php
    # After – app/Http/Controllers/UserController.php

    It’s painful when you accidentally do this because you have to either move the files or delete them and recreate everything. It’s not clear if the command will take care of chopping the extension when typing, so this is a nice touch to some hidden pain—at least for me 😉

    Add multiply() Method to Collections

    <iframe width=”1185″ height=”667″ src=”https://www.youtube.com/embed/AWvXjUnUdw8″ title=”Laravel collections now include a “multiply” method” frameborder=”0″ allow=”accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share” referrerpolicy=”strict-origin-when-cross-origin” allowfullscreen></iframe>

    Patrick O’Meara contributed a multiply() method to collections, which multiplies the items in the collection. It works by multiplying the existing values on the collection x number of times:

    $c = collect([
    [‘name’ => ‘User #1′, ’email’ => ‘user1@example.com’],
    [‘name’ => ‘User #2′, ’email’ => ‘user2@example.com’],
    ])->multiply(2);

    The collection above would look as follows after calling multiply(2):

    Add Event Discovery Paths to the Event Service Provider

    @Jascha contributed a addEventDiscoveryPaths() method to the event service provider if you need to add additional event discovery paths dynamically. This feature isn’t typically needed, but you can do so with:

    use IlluminateFoundationSupportProvidersEventServiceProvider;

    EventServiceProvider::addEventDiscoveryPaths(‘/some/path/to/events’);
    EventServiceProvider::addEventDiscoveryPaths([
    ‘/some/path’,
    ‘/another/path’
    ]);

    Release notes

    You can see the complete list of new features and updates below and the diff between 11.11.0 and 11.12.0 on GitHub. The following release notes are directly from the changelog:

    v11.12.0

    [10.x] Fix typo in return comment of createSesTransport method by @zds-s in https://github.com/laravel/framework/pull/51688

    [10.x] Fix collection shift less than one item by @faissaloux in https://github.com/laravel/framework/pull/51686

    [10.x] Turn Enumerable unless() $callback parameter optional by @faissaloux in https://github.com/laravel/framework/pull/51701

    Revert “[10.x] Turn Enumerable unless() $callback parameter optional” by @taylorotwell in https://github.com/laravel/framework/pull/51707

    [10.x] Fixes unable to call another command as a initialized instance of Command class by @crynobone in https://github.com/laravel/framework/pull/51824

    [10.x] fix handle shift() on an empty collection by @Treggats in https://github.com/laravel/framework/pull/51841

    [10.x] Ensureschema:dump will dump the migrations table only if it exists by @NickSdot in https://github.com/laravel/framework/pull/51827

    [11.x] Test Improvements by @crynobone in https://github.com/laravel/framework/pull/51847

    [11.x] Test application storage path by @seriquynh in https://github.com/laravel/framework/pull/51848

    [11.x] Fix PHP_MAXPATHLEN check for strings slightly smaller then PHP_MAXPATHLEN by @joshuaruesweg in https://github.com/laravel/framework/pull/51850

    [11.x] Improve Bus::assertNothingDispatched(), Event::assertNothingDispatched(), Mail::assertNothingSent(), Notification::assertNothingSent() error messages by @macbookandrew in https://github.com/laravel/framework/pull/51846

    [11.x] Update error page to show GET by @chu121su12 in https://github.com/laravel/framework/pull/51837

    [11.x] Remove deprecated type attributes in the exception renderer by @osbre in https://github.com/laravel/framework/pull/51866

    [11.x] Import classes in the exception templates by @osbre in https://github.com/laravel/framework/pull/51863

    [11.x] Collection before/after optimization by @bert-w in https://github.com/laravel/framework/pull/51876

    [11.x] Add multiply to collection by @patrickomeara in https://github.com/laravel/framework/pull/51870

    [11.x] Add addEventDiscoveryPaths to EventServiceProvider by @ya-cha in https://github.com/laravel/framework/pull/51896

    [11.x] Fix validation attributes when translations are empty or missing by @owenandrews in https://github.com/laravel/framework/pull/51890

    [11.x] feat: add generics to tap() helper by @calebdw in https://github.com/laravel/framework/pull/51881

    v11.11.1

    [11.x] Remove useless variable assignment by @seriquynh in https://github.com/laravel/framework/pull/51838

    [11.x] Fix event dispatcher typing in cache repository by @axlon in https://github.com/laravel/framework/pull/51835

    Chop PHP extension when passed to make commands by @jasonmccreary in https://github.com/laravel/framework/pull/51842

    [11.x] Simplify .php extension chopping in getNameInput by @osbre in https://github.com/laravel/framework/pull/51843

    [11.x] fix: improve performance and robustness of Relation::getMorphAlias() by @calebdw in https://github.com/laravel/framework/pull/51845

    Revert “[11.x] Change scope for afterCreating and afterMaking callbacks” by @driesvints in https://github.com/laravel/framework/pull/51858

    The post Artisan `make` Commands Automatically Chop `.php` Extension in Laravel 11.12 appeared first on Laravel News.

    Join the Laravel Newsletter to get all the latest Laravel articles like this directly in your inbox.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleCreatio Raises $200M at $1.2B Valuation to Lead the Enterprise No-Code Market
    Next Article Salesforce, Women In Technology, and Perficient Unite to Empower Women Through Collaboration

    Related Posts

    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 17, 2025
    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-48187 – RAGFlow Authentication Bypass

    May 17, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    The Razer Viper V2 Pro, one of the best lightweight gaming mice, is now on sale for less than $90

    News & Updates

    How to configure JMeter to dynamically read data from one of multiple CSV files based on load distribution?

    Development

    8 Top Free and Open Source Clojure Web Frameworks

    Development

    Google releases reasoning model Gemini 2.5, its “most intelligent AI model” yet

    Tech & Work
    Hostinger

    Highlights

    Artificial Intelligence

    Solving the mystery of how an ancient bird went extinct

    May 13, 2025

    Creating a tool to study extinct species from 50,000 years ago Source: Read More 

    Llama-3-based OpenBioLLM-Llama3-70B and 8B: Outperforming GPT-4, Gemini, Meditron-70B, Med-PaLM-1 and Med-PaLM-2 in Medical-Domain

    April 30, 2024

    Login with different Login ID’s for native mobile application using JMeter

    November 20, 2024

    Top 12 Git commands every developer must know

    June 10, 2024
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.