Category : namespaces

For instance let’s say the ”’ $model_name = ‘student_table’; ”’ ‘providers’ => [ ‘users’ => [ ‘$model_name’ => [ ‘driver’ => ‘eloquent’, ‘model’ => AppModels.$model_name.::class ] ] ] The problem is that laravel fires an unexpected ‘.’ expecting identified (T_STRING) And I need to insert the model name dynamically because there lot of database tables ..

Read more

I created a script app/notify_uploaded_doc.php, which needs to use some existing Laravel Models and Mailables (defined in app/ as well, and namespaced under MyApp). When I tried to include them in the script with use MyAppRequiredDocument; for example, and execute the script on the command line with $ php notify_uploaded_doc.php, it gives me the exception: ..

Read more