UniSharp / laravel-filemanager

Media gallery with CKEditor, TinyMCE and Summernote support. Built on Laravel file system.
https://unisharp.github.io/laravel-filemanager/
MIT License
2.07k stars 720 forks source link

Issue with routes #948

Open mrdigitalau opened 4 years ago

mrdigitalau commented 4 years ago

Hi,

Cheers for the great package.

there is an issue with Routes when I am uploading my project via Ploi to my server

And provide the followings :

I am

Illuminate\Foundation\Console\Kernel::handle()
  21  artisan:37

      +20 vendor frames 
    206|             $route->name($name = $this->generateRouteName());
    207| 
    208|             $this->add($route);
    209|         } elseif (! is_null($symfonyRoutes->get($name))) {
  > 210|             throw new LogicException("Unable to prepare route [{$route->uri}] for serialization. Another route has already been assigned name [{$name}].");
    211|         }
    212| 
    213|         $symfonyRoutes->add($route->getName(), $route->toSymfonyRoute());
    214|
at vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php:210

  Unable to prepare route [filemanager/cropnewimage] for serialization. Another route has already been assigned name [unisharp.lfm.getCropimage].
   LogicException 
mafftor commented 4 years ago

Hi, it's problem with routes' name I've fixed it in my version of this package visit and try https://github.com/mafftor/laravel-file-manager

mrdigitalau commented 4 years ago

@mafftor Thank you very much sir. I have used your version and it work great. Cheers

Andicot commented 4 years ago

Please solve this problem with cached routes

paulohps commented 3 years ago

Please solve this problem with cached routes

tolgacibikci commented 3 years ago

@mafftor Hi can you fix this problem in this package?

mafftor commented 3 years ago

@mafftor Hi can you fix this problem in this package?

Hi, I already did, but not here, see my version of this project in my profile

tolgacibikci commented 3 years ago

@mafftor There is a problem and you know solution. But you are solving in different package. Really really good solution.

For each problem, let's open a new package and solve the problem there. Great open source contribution :)

Thank you.

mafftor commented 3 years ago

@mafftor There is a problem and you know solution.

But you are solving in different package. Really really good solution.

For each problem, let's open a new package and solve the problem there.

Great open source contribution :)

Thank you.

I needed a custom solution and couldn't create a lot of requests of my "point of view" here.

I don't agree with many things in this package, that's why I had to create my own version for the client and buddies.

I've fixed not only one problem, I can't merge all of them

HakerTag commented 3 years ago

Hi,

Cheers for the great package.

there is an issue with Routes when I am uploading my project via Ploi to my server

And provide the followings :

  • Operating system : Ubuntu
  • Laravel version : 7.9.2
  • PHP: 7.4
  • Package version : 2.0
  • Steps to reproduce your issue : I am using PLOI (Similar to Forge) to deploy my project and receive the below error each time relating to a route in this package.
  • Screenshots of browser console :

I am

Illuminate\Foundation\Console\Kernel::handle()
  21  artisan:37

      �[2m+20 vendor frames �[22m
    206|             $route->name($name = $this->generateRouteName());
    207| 
    208|             $this->add($route);
    209|         } elseif (! is_null($symfonyRoutes->get($name))) {
  > 210|             throw new LogicException("Unable to prepare route [{$route->uri}] for serialization. Another route has already been assigned name [{$name}].");
    211|         }
    212| 
    213|         $symfonyRoutes->add($route->getName(), $route->toSymfonyRoute());
    214|
at vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php:210

  Unable to prepare route [filemanager/cropnewimage] for serialization. Another route has already been assigned name [unisharp.lfm.getCropimage].
   LogicException 

oh no.. ### has no problem with me... problem in documentation.

you use two time in same route name. Follow A or B

A

  1. config-->lft.php 'use_package_routes' => true,

  2. routes-->web //disable /Route::group(['prefix' => 'laravel-filemanager', 'middleware' => ['web', 'auth']], function () { \UniSharp\LaravelFilemanager\Lfm::routes(); });/

  3. but route path by default 'prefix' => 'filemanager'

  4. so that need to change view in 'laravel-filemanager' to 'filemanager'

B

  1. config-->lft.php 'use_package_routes' => false,

  2. routes-->web // enable Route::group(['prefix' => 'laravel-filemanager', 'middleware' => ['web', 'auth']], function () { \UniSharp\LaravelFilemanager\Lfm::routes(); });

AbdullahTgr commented 2 years ago

thanks