Comments (13)
Hello Vista, no doubt there are many issues because I didn't take the time to write any tests ^^
Feel free to propose a PR and i'll check it out ASAP
from laravel-boilerplate.
@adr1enbe4udou1n hello bro I am currently deep diving into your code but don't know what these means
'permissions' => session()->get('permissions'),
'isImpersonation' => session()->has('admin_user_id') && session()->has('temp_user_id'),
'usurperName' => session()->get('admin_user_name'),
How they get in session cannot find any middle ware and controller which sets these in sessions. Where are they done?
from laravel-boilerplate.
@adr1enbe4udou1n And I cannot see any css due to these lines during development so have to comment this in view file?
{{-- @if (app()->environment('production')) --}}
{{-- @endif --}}
how do we run this app properly in development
from laravel-boilerplate.
You'll find all this sessions things in app/Repositories/EloquentAccountRepository.php
"permissions" are setted (for caching) in EloquentAccountRepository.php@login method, which is called by app/Listeners/LoginEventListener.php :
session(['permissions' => $user->getPermissions()]);
For impersonation, look at EloquentAccountRepository.php@loginAs
CSS link files are not directly served in development mode because they are already injected into JS files, in order to support HMR (ExtractTextPlugin for webpack is disabled).
In order to see CSS in development, you must compile your dev assets simply by launching yarn watch
from laravel-boilerplate.
Thanks got it .
I have trouble understanding this doc.
It says:
So, if a user navigates to http://url-to-laravel/test and the system has this middleware active and 'en' as the current locale for this user, it would redirect (301) him automatically to http://url-to-laravel/en/test. This is mainly used to avoid duplicate content and improve SEO performance.
But in our case we are not redirected right? Why is this happening with our app? Cannot understand how this package work. May be I work only on english :(
And the document also don't mention what these middleware do can you help me because I think you know about it.
'localize' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRoutes::class,
'localizationRedirect' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRedirectFilter::class,
'localeSessionRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect::class,
And document says
If you want to hide the default locale but always show other locales in the url, switch the hideDefaultLocaleInURL config value to true. Once it's true, if the default locale is en (english) all URLs containing /en/ would be redirected to the same url without this fragment '/' but maintaining the locale as en (English).
By hiding do it mean we hide en in url.com/en ? and what that second sentence means ??
And we inject this package class anyreason or to use its helper function.
It will be helpful and after understanding these I can writing test for this app.
Thanks
from laravel-boilerplate.
And what should i set in these env files
BROWSERSYNC_PROXY=
BROWSERSYNC_HOST=
BROWSERSYNC_PORT=
WEBPACKDEVSERVER_PORT=
When i run npm run dev
it shows
[Browsersync] Access URLs:
--------------------------------------
UI: http://localhost:3001
--------------------------------------
UI External: http://192.168.0.106:3001
--------------------------------------
I should enter localhost:3001 in BROWSERSYNC_HOST But what should i enter in other?
from laravel-boilerplate.
The simplest URLs config for local dev :
APP_URL=http://localhost:8000 (with php artisan serve)
BROWSERSYNC_PROXY=localhost:8000
BROWSERSYNC_HOST=localhost
BROWSERSYNC_PORT=5000
WEBPACKDEVSERVER_PORT=7000 (for HMR feature)
Then choose between this commands :
yarn watch
for simpler JS/CSS compilingyarn hot
for advanced hot reloading (without browser refresh), very useful for backend development which is full JS
from laravel-boilerplate.
Currently I have not set anything and it is working perfectly. Do it mean that defaults works with php artisan serve works fine for default config?
from laravel-boilerplate.
Regarding locale can you help me.
I have even created issue on that package. It would be helpful
from laravel-boilerplate.
For locale :
- hideDefaultLocaleInURL is true : if current user locale is same as default APP_LOCALE, /en/about/ is 301 redirected to /about/ (default locale is hidden)
- hideDefaultLocaleInURL is false : if '/about/' matches to a valide route with current user locale, he will be redirected to /[user_locale]/about/
from laravel-boilerplate.
I read docs it says it will redirect url.com/about to url.com/en/about due to SEO. What happen if we turn on hideDefaultLocaleinUrl to true
from laravel-boilerplate.
Hi @bloggervista,
The localization package used here is mcamara/laravel-localization
and not the ARCANEDEV/Localization
.
Check here
from laravel-boilerplate.
I guess I should dig in that package.
from laravel-boilerplate.
Related Issues (20)
- Congrats To this Boilerplate and adr1enbe4udou1n [Not Issue]
- Removing Image Cache? HOT 1
- "npm run build" command causes a lot of prettier errors HOT 4
- Can not run php artisan db:seed HOT 1
- php artisan db:seed - error HOT 2
- Error page about HOT 1
- RoleForm.vue does not display feedback HOT 1
- RU translation misspell HOT 1
- User slugs are not unique HOT 2
- admin password reset HOT 1
- IE11 Backend Demo not working HOT 1
- phpunit error HOT 1
- Upgrade to 5.8? HOT 6
- Multiple authentication? HOT 7
- Upgrade to 6.0?
- server exception HOT 10
- Ways to images ? HOT 22
- [Vue warn]: Error in nextTick: "TypeError: Cannot convert undefined or null to object" HOT 1
- seocontroller and sitemap HOT 1
- Can you make the code without using the JSON data type? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-boilerplate.