thekordy / ticketit

A simple helpdesk tickets system for Laravel 5.1+ which integrates smoothly with Laravel default users and auth system, demo is available at: http://ticketit.kordy.info/tickets
MIT License
875 stars 387 forks source link

FatalThrowableError in routes.php line 7: Call to undefined function get() #333

Open brazitech opened 7 years ago

brazitech commented 7 years ago

hello trying to install to existing l 5.4 project and i get the following error.

FatalThrowableError in routes.php line 7: Call to undefined function get()

in routes.php line 7
at TicketitServiceProvider->{closure}(object(Router)) in Router.php line 310
at Router->loadRoutes(object(Closure)) in Router.php line 270
at Router->group(array('middleware' => 'auth'), object(Closure)) in routes.php line 21
at include('/var/www/allmyflies/vendor/kordy/ticketit/src/routes.php') in TicketitServiceProvider.php line 91
at TicketitServiceProvider->register() in Application.php line 574
at Application->register(object(TicketitServiceProvider)) in ProviderRepository.php line 75
at ProviderRepository->load(array('Illuminate\\Auth\\AuthServiceProvider', 'Illuminate\\Broadcasting\\BroadcastServiceProvider', 'Illuminate\\Bus\\BusServiceProvider', 'Illuminate\\Cache\\CacheServiceProvider', 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'Illuminate\\Cookie\\CookieServiceProvider', 'Illuminate\\Database\\DatabaseServiceProvider', 'Illuminate\\Encryption\\EncryptionServiceProvider', 'Illuminate\\Filesystem\\FilesystemServiceProvider', 'Illuminate\\Foundation\\Providers\\FoundationServiceProvider', 'Illuminate\\Hashing\\HashServiceProvider', 'Illuminate\\Mail\\MailServiceProvider', 'Illuminate\\Notifications\\NotificationServiceProvider', 'Illuminate\\Pagination\\PaginationServiceProvider', 'Illuminate\\Pipeline\\PipelineServiceProvider', 'Illuminate\\Queue\\QueueServiceProvider', 'Illuminate\\Redis\\RedisServiceProvider', 'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider', 'Illuminate\\Session\\SessionServiceProvider', 'Illuminate\\Translation\\TranslationServiceProvider', 'Illuminate\\Validation\\ValidationServiceProvider', 'Illuminate\\View\\ViewServiceProvider', 'Laravel\\Tinker\\TinkerServiceProvider', 'App\\Providers\\AppServiceProvider', 'App\\Providers\\AuthServiceProvider', 'App\\Providers\\EventServiceProvider', 'App\\Providers\\RouteServiceProvider', 'App\\Providers\\LocalServiceProvider', 'App\\Providers\\JoshCrudGeneratorServiceProvider', 'Collective\\Html\\HtmlServiceProvider', 'Cartalyst\\Sentinel\\Laravel\\SentinelServiceProvider', 'Cviebrock\\EloquentSluggable\\ServiceProvider', 'Cviebrock\\EloquentTaggable\\ServiceProvider', 'Yajra\\Datatables\\DatatablesServiceProvider', 'Intervention\\Image\\ImageServiceProvider', 'Kordy\\Ticketit\\TicketitServiceProvider', 'Laracasts\\Flash\\FlashServiceProvider', 'Prettus\\Repository\\Providers\\RepositoryServiceProvider', 'InfyOm\\Generator\\InfyOmGeneratorServiceProvider', 'InfyOm\\CoreTemplates\\CoreTemplatesServiceProvider', 'InfyOm\\GeneratorBuilder\\GeneratorBuilderServiceProvider')) in Application.php line 549
at Application->registerConfiguredProviders() in RegisterProviders.php line 17
at RegisterProviders->bootstrap(object(Application)) in Application.php line 208
at Application->bootstrapWith(array('Illuminate\\Foundation\\Bootstrap\\LoadEnvironmentVariables', 'Illuminate\\Foundation\\Bootstrap\\LoadConfiguration', 'Illuminate\\Foundation\\Bootstrap\\HandleExceptions', 'Illuminate\\Foundation\\Bootstrap\\RegisterFacades', 'Illuminate\\Foundation\\Bootstrap\\RegisterProviders', 'Illuminate\\Foundation\\Bootstrap\\BootProviders')) in Kernel.php line 160
at Kernel->bootstrap() in Kernel.php line 144
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
at Kernel->handle(object(Request)) in index.php line 53

please help. after 2 days i have no clue....

sunnyjayjay commented 7 years ago

I have the same problem

balping commented 7 years ago

@brazitech Does your other suggestion ( https://github.com/thekordy/ticketit/issues/334 ) fix this issue?

brazitech commented 7 years ago

this can be closed and make references to issue #335. fixing that issue will resolve this issue. after testing ^6 only works in lynx. not working for windows. in windows ^7 is the only thing that works. composer in windows is not recognizing the ^6 to include 7. i think the command for v6 or greater is different in windows. i do not know what that is in composer.

brazitech commented 7 years ago

ok i just tested on all systems (mac, ubuntu 16, and windows 10. using ~7.0 works on all 3. ^7.0 only works on windows.

sunnyjayjay commented 7 years ago

Please can you be clearer about what I need to do to make this work please?

brazitech commented 7 years ago

"yajra/laravel-datatables-oracle": "~6.0", in composer.jason needs to be changed to "yajra/laravel-datatables-oracle": "~7.0", "yajra/laravel-datatables-oracle": "^6.0", will only work in ubuntu this is only for laravel 5.4 laravel 5.4 uses yajra/laravel-datatables-oracle:7.3

sunnyjayjay commented 7 years ago

I have made that change and it has no effect. I still get

Call to undefined function get()

I am using Windows 10 and running on Laragon. Laravel 5.4.

brazitech commented 7 years ago

i am also using windows 10 and laravel 5.4. i finally got the composer to install with no errors. now i get page not found. it seems the routes are not working. it seems to only work with laravel 5.2 or below. i have not tried 5.3. i am going to downgrade to 5.3 and see if that works today.

brazitech commented 7 years ago

laravel v5.3 installs and then tickets-install goes to page not found..

brazitech commented 7 years ago

got it to install in laravel 5.4 with ~7 instead of ~6. also had to move Controllers. Middleware directory along with routes.php to Http directory in root. now dealing with error: QueryException in Connection.php line 647: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'allmyflies.ticketit_settings' doesn't exist (SQL: select value, slug from ticketit_settings)

brazitech commented 7 years ago

giving up.. 5 days this will not install into an existing laravel 5.4 site... and you get no help on issues.. this was a total waste of time........

sunnyjayjay commented 7 years ago

I agree. This has been the most frustrating "component" since its outset. It would be quicker to write one's own - which I am now going to do.

Shalto commented 5 years ago

Same here, Getting Call to undefined function get() [2019-04-04 16:58:19] local.ERROR: Call to undefined function get() {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to undefined function get() at /vendor/kordy/ticketit/src/routes.php:7) [stacktrace]

0 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(413): Kordy\Ticketit\TicketitServiceProvider->{closure}(Object(Illuminate\Routing\Router))

1 /vendor/laravel/framework/src/Illuminate/Routing/Router.php(373): Illuminate\Routing\Router->loadRoutes(Object(Closure))

2 /vendor/kordy/ticketit/src/routes.php(21): Illuminate\Routing\Router->group(Array, Object(Closure))

3 /vendor/kordy/ticketit/src/TicketitServiceProvider.php(91): include('/Users/shalto/S...')

4 /vendor/laravel/framework/src/Illuminate/Foundation/Application.php(597): Kordy\Ticketit\TicketitServiceProvider->register()

5 /vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\Foundation\Application->register(Object(Kordy\Ticketit\TicketitServiceProvider))

6 /vendor/laravel/framework/src/Illuminate/Foundation/Application.php(574): Illuminate\Foundation\ProviderRepository->load(Array)

7 /vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\Foundation\Application->registerConfiguredProviders()

8 /vendor/laravel/framework/src/Illuminate/Foundation/Application.php(210): Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap(Object(Illuminate\Foundation\Application))

9 /vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(311): Illuminate\Foundation\Application->bootstrapWith(Array)

10 /vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(120): Illuminate\Foundation\Console\Kernel->bootstrap()

11 /artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

12 {main}

"}