laravel-shareable-models: route is not working
There are some problems with documentation.
- the entry to be put in the routes file has a typo:
Route::get('shared/{shareable_link}', ['middleware' => 'shared', function (ShareableLink $link) {
return $link->shareable;
});
A closing bracket ]
is missing.
- the route doesn’t work anyway. To be honest I have no idea why. I tried to link the route to middleware using an alternative syntax
Route::get('shared/{shareable_link}', function (Sassnowski\LaravelShareableModel\Shareable\ShareableLink $link) {
return 'test OK';
})->middleware('shared');
But to no result.
Maybe you could run the package on a clean new instance of Laravel 5.5?
- In docs here
https://ksassnowski.gitbooks.io/shareable-models/content/getting-started.html
it would be nicer if you mention that the user should declare the class in the header of the controller file:use Sassnowski\LaravelShareableModel\Shareable\ShareableLink;
The package should be great, anyway! Thank you.
Peter
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 37 (18 by maintainers)
Glad to hear its working now. I tagged version 2.0.0 just now.
Regarding your points:
doctrine/dbal
to the dev dependencies since its needed to drop columns on sqlite databasesbase_url
key.Kai
Can you try if
returns a hash? You might be running into a
PHP_MAX_INT
error where the generated UUID is too large for your system to handle.