Laravel Backpack How to create new page without CRUD
Asked Answered
G

1

5

Sorry Guy I'm new with Laravel Backpack 4.3 need your expertise.

I wanna create a simple page without CRUD is that possible on Laravel Backpack, if yes Which file I need to work on?

Grapeshot answered 29/3, 2019 at 7:52 Comment(0)
M
14

Of course. The process is the same as standard Laravel (add a route, controller and view), though you might want to use the same file structure as Backpack, and extend the Backpack layout file to keep the same design.

You can do it however you want, but usually people that use Backpack:

  • add the route to their routes/backpack/custom.php file, inside the same route group as their CRUDs; so it's easier to find;
  • add the controller to their app/Http/Controllers/Admin/ folder, so that all admin-related controllers are in one place;
  • add the view file inside resources/views/admin or something like that;

For an example:

  • take a look at AdminController, that Backpack\Base uses to load the empty dashboard page;
  • take a look at the dashboard.blade.php file to see how it extends the Backpack layout;

Hope it helps.

Mclemore answered 5/6, 2019 at 10:0 Comment(6)
Helped me. Dec 2020. You'll probably never know how people you helped but I think you are awesome! Thank you. – Arc
I just found out you not only answered my question - you're also the founder of Laravel Backpack. Me and the small company of friends I work in LOVE it! We will use it in every future project possible :D Let me thank you for your hard work again and with greater scope :D – Arc
Haha thank you for the kind words Martin - you put a smile on my face πŸ˜‰ – Mclemore
Helped me again August 2021 xD – Arc
Great! Can you add this to Backpack bocumentation... – Snead
@Mclemore getting Error -> Target class [App\Http\Controllers\Admin\ExportController@index] does not exist. – Drexler

© 2022 - 2024 β€” McMap. All rights reserved.