Laravel + Quasar 1.0 with Quasar CLI
-
As I see it, and I’ll admit, I’m not an expert, but if you are using Quasar CLI, that means you are building a pure JS frontend app, or rather should be. So, this means nothing is being built using Blade, i.e. no server side rendering via PHP, which means the PHP side is only for an API.
And with the CLI, you’ll need Node anyway, so to test the frontend code, you need Node based testing tools (see the testing App Extension). I’d suggest avoiding using Dusk for testing the front-end code. And I’d suggest to use other PHP testing methodologies specifically for testing the API code, which you would be writing in Laraval/ PHP.
Or do like so many other devs have and drop PHP and learn Node outright. I did, and I’ve never looked back.
Scott
-
@s-molinari said in Laravel + Quasar 1.0 with Quasar CLI:
Or do like so many other devs have and drop PHP and learn Node outright. I did, and I’ve never looked back.
Scott
I’ve just decided to do just that too … I was planning to use Laravel as my backend API … but I’ve been looking at LoopBack.io and considering using that instead and the whole API creation/authorisation /integration seems so much simpler using LoopBack that I’m now planning on using that instead.
-
@digiproduct here are quite mind boggling benchmarks about backend API frameworks:
https://www.techempower.com/benchmarks/#section=data-r17&hw=ph&test=update
in “data updates” test, laravel is placed at 186 position
let the backend frameworks wars begin ha ha ha (evil laugh)
-
@qyloxe I’d never heard of most of those frameworks … and I’ve got no idea how to interpret that data.
I’ll just try and see what happens
-
This post is deleted! -
@metalsadman thanks so much for upgrading your example. Questions:
1.- After launch quasar build, what folder should we use as entry point for our web server ? Here we are trying to keep both project togeter and maybe due to Laravel Views now support html as a file type in v5.8.18 ( https://github.com/laravel/framework/pull/28541 ) we can take advantages from this.2.- In your quasar.conf filee, after detecting we are in prod env, can you please explain why do you use this lines:
cfg.plugins.push(new CopyWebpackPlugin([{ from: path.resolve(__dirname, 'public_files'), to: '' }]))
I know this is not the best example, and again, frontend app (and repo) should be separated from API, but I guess this is the main point for the thread.
-
- not entirely sure bout this but probably related to number 2. just tested this using the api.
- it’s the target public folder using symlink iirc, where your quasar index.html resides.
i’ll have to test it more soon, when i’m sort of free.
-
Finally, I able to create a workable dockerfile for development machine. Took quite a long time.
-
I am trying to do the same thing, if anyone can help, it will be welcome https://github.com/modemb/larasar
-
@stefanvh A lot of thanks
-
I have used Laravel Vue JS before for creating a single page application. What I am wondering is, If I am using Quasar, instead of directly using vue js, then how can i create an SPA?
-
@olidev did you mean quasar cli + laravel see https://github.com/metalsadman/quasar-laravel? else you can just use quasar as umd… see the docs for quasar flavors.
-
@lucasfernog you already have what u require…
-
@Aziz-Khan @lucasfernog picked up the ball and ran so hard, he’s on the core team now
-
-
-
https://github.com/metalsadman/quasar-laravel
Hope more people contribute to this one. Laravel 6 (passport support).