What does Laravel 6 version using a
return view(view: 'index', data: compact(varname: 'string'));
I was following a tutorial, but the one I downloaded it seems it's different codes on the tutorial and always gets me an error. I downloaded a Laravel 6.11.0 version. I'm a beginner on this framework hope there's someone could understand and I want to learn about this laravel framework.
here is the tutorial link
https://www.youtube.com/watch?v=98ChVWjI6KI&list=PLpzy7FIRqpGC8Jk6gyWdSVdxCVXZAsenQ&index=5
You should just use:
return view('index', compact('string'));
Those view:, data: and varname: are parameter name hints from PHPStorm IDE and not the actual code.
Related
I'm new to laravel and I'm having some issues in generating an api documentation (SwaggerAPI, OpenAPI, Postman, whatever it works). I am upgrading a laravel application and got stuck got a few things I need to do solve with the latest version (9.x)
I've followed the steps installing the most popular libraries but I failed getting and error because of lumen is a higher version that is not supported. I also cannot run artistan vendor because it seems not working in Laravel 9 neither.
I've tested the following libraries and they didn't run in Laravel 9:
L5 Swagger
laravel-apidoc-generator
Laravelista and Vendor
Can anyone help me?
I have a laravel + Vue.js project template downloaded from Creative Tim. Its login and register is not proceeding, giving the catch error whereas in the template demo its working fine. I think so the instructions said to write the VUE_APP_API_BASE_URL in Vue .env file and I didn't wrote it correct. Can anyone pls tell me how can I locate the exact address and what syntax it would be?
Since you are using vue with laravel, you need to prefix MIX_ before the variable. Eg:
MIX_VUE_APP_API_BASE_URL=http://localhost:8000
Here is the reference: https://laravel.com/docs/8.x/mix#environment-variables
I hope you are doing fine. I was working on Oauth passport laravel, it was working fine on my previouse machine but i had to switch machines.My new machine has php 8 and my laravel project is of 7.30.0 version and my lcobucci/jwt version is 3.3.3. When i try to hit register route on postman i get the following error
Lcobucci\JWT\Signer\InvalidKeyProvided: It was not possible to parse your key, reason: in file C:\Users\user\Documents\GitHub\myproject\vendor\lcobucci\jwt\src\Signer\InvalidKeyProvided.php on line 17
As you can see on https://packagist.org/packages/lcobucci/jwt#3.3.3, that JWT package is officially not compatible with PHP 8. You should upgrade it to a compatible version (at least v4), or downgrade your PHP version to v7
This is coming super late.
For anyone still experiencing this, just generate a new jwt secret.
This command will generate a new key that fits the new requirement
php artisan jwt:secret
I'm trying to setup cartalyst/converter on laravel 5.6 Their link is here: https://cartalyst.com/manual/converter/2.0
I'm following official instruction and getting
Call to undefined method Illuminate\Foundation\Application::share()
I feel like Cartalyst\Converter\Laravel\ConverterServiceProvider is not livable.
How else can I install it?
They have "Native" way, but in laravel case where would I put their "native" code?
Illuminate\Foundation\Application::share() method was removed in Laravel 5.4, in favor of the singleton() method.
Do you need to use v2.0 of this package? 3.0 was released specifically to stay up-to-date with Laravel. I suggest using the most recent version instead of the 2.0 branch.
https://cartalyst.com/manual/converter/3.0
I am using codeigniter 2.1.2 and I want to use scaffolding feature to add information to table. When I set this $route['scaffolding_trigger'] = 'scaffolding'; in routes.php and call it in controller $this->load->scaffolding('applicants'); I get the following Error:
Fatal error: Call to undefined method CI_Loader::scaffolding() in C:\xampp\htdocs\hmplatform\application\controllers\Applicant.php on line 6 So I am asking if I can find a library that contains scaffolding features because in this version I downloaded from GIT there is no scaffolding folder.
Scaffolding was depreciated in codeigniter. It isn't longer offered. The tutorials are outdated, so I'm guessing this is where you saw it?