izniburak / laravel-auto-routes Goto Github PK
View Code? Open in Web Editor NEWAuto Route Generating (Auto-Discovery) Package for Laravel.
Auto Route Generating (Auto-Discovery) Package for Laravel.
Hi,
I got an error about child controller classes. If you have a child controller class, which extended from another controller, the library could not discover routes from class methods correctly.
Example:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class FooController extends Controller
{
protected $type = 'FooControllerClass';
public function index()
{
return response()->json([$this->type]);
}
public function info()
{
return response()->json(['info' => $this->type]);
}
}
<?php
namespace App\Http\Controllers;
class BarController extends FooController
{
protected $type = 'BarControllerClass';
}
And in routes/web.php
Route::auto('foo', \App\Http\Controllers\FooController::class);
Route::auto('bar', \App\Http\Controllers\BarController::class);
I expected to work these codes correctly but they didn't work. The library discover all public methods in Parents of parent class like App\Http\Controllers\Controller, Illuminate\Routing\Controller.
Now, I know the problem and I started to work on it in order to fix it urgently.
Probably, I will release a new version for the library.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.