fumeapp / laranuxt Goto Github PK
View Code? Open in Web Editor NEWLaravel and Nuxt.js boilerplate
Laravel and Nuxt.js boilerplate
"logs" command is missing in package.json
❯ git clone [email protected]:fumeapp/laranuxt.git
Cloning into 'laranuxt'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Is there any contribution guide for this project or I should just go ahead to create a PR stating what I worked on?.
move loggedIn
to a cookie check and stop there - properly respond to an access denied endpoint with removing the session and redirecting properly - keep the FE simple!
@acidjazz what's your take on adding phpstan?
I suggest to support docker compose in this awesome boilerplate
Hi!
I'm curious if you are able to view the debugbar within your Nuxt application in this setup?
Thanks!
There is some error during the installation of Laravel in the composer update.
Could you please check it out again?
Thx
Hey, I tried to login with Mail but this doesnt work.
I got the Mail but nothing happens after clicking this.
No Errors, I'am still not logged in.
Any Idea?
Thanks for your work!
Followed these steps:
I get the following error message:
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
InvalidArgumentException : Please provide a valid cache path.
at /home/anthony/Projects/LaraNuxt/vendor/laravel/framework/src/Illuminate/View/Compilers/Compiler.php:36
32| */
33| public function __construct(Filesystem $files, $cachePath)
34| {
35| if (! $cachePath) {
> 36| throw new InvalidArgumentException('Please provide a valid cache path.');
37| }
38|
39| $this->files = $files;
40| $this->cachePath = $cachePath;
Exception trace:
1 Illuminate\View\Compilers\Compiler::__construct()
/home/anthony/Projects/LaraNuxt/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php:141
2 Illuminate\View\ViewServiceProvider::Illuminate\View\{closure}()
/home/anthony/Projects/LaraNuxt/vendor/laravel/framework/src/Illuminate/Container/Container.php:799
Please use the argument -v to see more details.
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
I tried after composer install: php artisan generate:key
same error and also composer dump-autoload
Hello, Kevin!
I using your laravel-nuxt starter project and the my question is How I run laravel api server and nuxt client in the same server. I found this example in https://nuxtjs.org/faq/nginx-proxy/, but it use forge. I`m using DigitalOcean to host my website with ubuntu18.04. I would like run laravel and nuxt on it. Unfortunately my domain name service plan does not allow create subdomain.
# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/YOUR_WEBSITE_FOLDER/before/*;
map $sent_http_content_type $expires {
"text/html" epoch;
"text/html; charset=utf-8" epoch;
default off;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name YOUR_WEBSITE_DOMAIN;
# FORGE SSL (DO NOT REMOVE!)
ssl_certificate /etc/nginx/ssl/YOUR_WEBSITE_FOLDER/258880/server.crt;
ssl_certificate_key /etc/nginx/ssl/YOUR_WEBSITE_FOLDER/258880/server.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!3DES';
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/dhparams.pem;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
charset utf-8;
gzip on;
gzip_types text/plain application/xml text/css application/javascript;
gzip_min_length 1000;
# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/YOUR_WEBSITE_FOLDER/server/*;
location / {
expires $expires;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_read_timeout 1m;
proxy_connect_timeout 1m;
proxy_pass http://127.0.0.1:3000; # set the adress of the Node.js
}
access_log off;
error_log /var/log/nginx/YOUR_WEBSITE_FOLDER-error.log error;
location ~ /\.(?!well-known).* {
deny all;
}
}
# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/YOUR_WEBSITE_FOLDER/after/*;```
Hi
Trying to create a couple of pages but unfortunately every time I try to access a page like /login it redirects me to index
for example I made a auth folder and inside of that there is a login.vue page
http://192.168.2.66:3000/auth/login returns me back to http://192.168.2.66:3000
Im Using Wamp for apache and latest node and npm
how can I disable this ? and why is this happening
thanks
Is there any way to load lazy images?
Could you consider to set require PHP version to the same require version of Laravel. I think this package is not necessary to require 7.4
i think this template must have a form helper to submiting form and catch validation errors, something like inertia form helper ( useForm )
I've followed the steps to install and run "yarn dev", but shows this error below. Please help:
ERROR ERROR in client/components/header/HeaderUser.vue:9:7 20:31:13
TS2451: Cannot redeclare block-scoped variable 'ctx'.
7 |
8 | <script lang="ts" setup>
9 | const ctx = useContext()
| ^^^
10 | const user = computed(() => ctx.$auth.user)
11 | console.log(ctx.$auth)
12 | </script>
ERROR in client/components/header/ModalLogin.vue:75:7
TS2451: Cannot redeclare block-scoped variable 'ctx'.
73 | const emit = defineEmits(['off'])
74 |
75 | const ctx = useContext()
| ^^^
76 | const email = ref('')
77 | const loading = reactive({
78 | attempt: false,
i try to install Nuxt 3 i18n Module but dosent work
@acidjazz One suggestion here: Dont integrate nuxt code into resources directory
Keeping the laravel resources directory kosher allows one to run as separate processes and involve different tech in separate directories - just to make it easier for anybody looking into this code to see where the boundaries are (it also makes managing deployments easier for example).
Proposed folder structure:
By extension, the nuxt.config.js and tailwind.config.js shouldn't be in the laravel config/ folder. Better if all front-end (nuxt) assets are in the same (proposed name: "client") directory.
Thank you for this repo @acidjazz
This one isn't a blocker in any way, the code still runs, but this is what I see when I run npm run dev (notice "Request failed with status code 404")
Thought I would report it!
$ npm run dev
> [email protected] dev /Users/kunalpunjabi/Code/LARAVEL_WORKING_CODE/NUXT/laranuxt
> nuxt config/
ℹ postcss-preset-env stage is set to 1 for supporting advanced css features nuxt:tailwindcss 21:46:07
start Loading module nuxt-purgecss 21:46:07
ℹ PurgeCSS is not enabled because you are in dev mode nuxt-purgecss 21:46:07
WARN Address localhost:3000 is already in use. 21:46:08
ℹ Trying a random port... 21:46:08
╭─────────────────────────────────────────────╮
│ │
│ Nuxt.js v2.8.1 │
│ Running in development mode (universal) │
│ │
│ Listening on: http://localhost:49373/ │
│ │
╰─────────────────────────────────────────────╯
ℹ Preparing project for development 21:46:12
ℹ Initial build may take a while 21:46:12
✔ Builder initialized 21:46:12
✔ Nuxt files generated 21:46:12
✔ Client
Compiled successfully in 14.42s
✔ Server
Compiled successfully in 13.70s
ℹ Waiting for file changes 21:46:31
ℹ Memory usage: 241 MB (RSS: 323 MB) 21:46:31
ERROR Request failed with status code 404 21:46:38
at createError (node_modules/axios/lib/core/createError.js:16:15)
at settle (node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:237:11)
at IncomingMessage.emit (events.js:187:15)
at IncomingMessage.EventEmitter.emit (domain.js:442:20)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
i have added this but when visti the guest page redirect me to home page
{ name: 'Test', icon: 'star', to: '/test', gated: false, names: ['test'], },
when other pages active
fro example
http://localhost:3000/sessions
and when reload the page redirect to
http://localhost:3000/
First of all, thank you for this amazing repository. However, it seems I have an issue with the web middleware. Whenever I add the middleware, it causes this error: Target class [web] does not exist.
as seen in the figure below. I've tried running php artisan optimize:clear
and config:cache
but the error still persists.
Before submitting this issue, I tried to register Laravel routes for better understanding. Below is the configuration I have:
public function boot()
{
$this->configureRateLimiting();
$this->routes(function () {
Route::middleware('api')
->prefix('api')
->group(base_path('routes/api.php'));
Route::middleware('web')
->group(base_path('routes/web.php'));
});
}
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'api' => [
\Illuminate\Routing\Middleware\ThrottleRequests::class . ':api',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
};
These are the configurations I've set up so far. I might be overlooking something. Could you please assist in resolving the issue? Any help would be greatly appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.