Laravel has an easy way to make different languages in the site?

|
VldimirMrn 2019-02-21 16:45:11
I have a problem. I need to use two methods update in one controller. How can I do it?
gmaciel 2019-02-21 16:52:43
you can call you method update and inside it you call different methods:

public function update($id)
{
$this->updateSomething($someID);
$this->updateOtherThing($otherID);
}

public function updateSomething($id)
{
<your code>
}

public function updateOtherThing($id)
{
<your code>
}

rijisoft 2019-02-21 20:23:43
Hi
I use this package
https://github.com/dimsav/laravel-translatable

I set this configuration for fallback translation
‘use_fallback’ => true,
‘fallback_locale’ => ‘fa’,

in Profile Class
public $useTranslationFallback = true;

in ProfileTranslation Class

public $useTranslationFallback = true;

but when locale language is ‘en’ not work
give this error

GitHub – dimsav/laravel-translatable: [Deprecated] A Laravel package for multilingual modelsGitHub
[Deprecated] A Laravel package for multilingual models – GitHub – dimsav/laravel-translatable: [Deprecated] A Laravel package for multilingual models
rijisoft 2019-02-21 20:24:06
laravel_discuss-2478.jpg
when locale is en : give this error
when local is fa : no problem
rijisoft 2019-02-21 20:24:46
what’s worng for me ๐Ÿ™ !
rijisoft 2019-02-21 21:34:40
translate(App::getLocale() , ‘fa’)
Use this parameters fix my errors , I don’t know it’s good or not
NSViking 2019-02-22 01:27:48
Helloooooo I need some help, Iโ€™m trying to improve my current architecture because until now Iโ€™m working with a simple controller that execute directly methods on model objects and return the data, all inside the controller, now I created some layers like use cases repositories and I donโ€™t know where is the best place to create this dependencies and where create the objects to inject. Currently this creation is inside the controller constructor … but I donโ€™t know if are any place to have this dependencies lives for each controller
rafael_santos90 2019-02-22 01:28:20
Hey guys, Laravel has an easy way to make different languages in the site?
Like translate the whole site do English/Spanish/Portuguese
ucouldbemine 2019-02-22 01:33:53
rafael_santos90 2019-02-22 01:28:20
Hey guys, Laravel has an easy way to make different languages in the site?
Like translate the whole site do English/Spanish/Portuguese

Yes

ucouldbemine 2019-02-22 01:34:31
Check laravel-translatable
ucouldbemine 2019-02-22 01:35:02
There’s a lot of solutions like this.
rafael_santos90 2019-02-22 01:36:14
ucouldbemine 2019-02-22 01:34:31
Check laravel-translatable

Nice! Thank you! ๐Ÿ™‚

2019-02-22 02:10:14
Please link group
oneStudent 2019-02-22 08:49:05
hi ๐ŸŒธ
Are there programmers in Persian?
imanghafoori 2019-02-22 08:49:48
oneStudent 2019-02-22 08:49:05
hi ๐ŸŒธ
Are there programmers in Persian?

yeah

oneStudent 2019-02-22 08:58:31
oneStudent 2019-02-22 08:49:05
hi ๐ŸŒธ
Are there programmers in Persian?

I have a project that I want to outsource
Please give me a PM…

Leetump 2019-02-22 09:28:33
Which admin panel is best for school management system
nasrulhazim 2019-02-22 09:31:54
Leetump 2019-02-22 09:28:33
Which admin panel is best for school management system

ask the end users

79423 2019-02-22 09:38:03
anyone used Vimeo to host premium videos?
htoowaikhant 2019-02-22 09:41:32
79423 2019-02-22 09:38:03
anyone used Vimeo to host premium videos?

yes

79423 2019-02-22 09:56:14
Htoo Wai did you use their API for uploading ?
Ahmed Magdi 2019-02-22 10:09:04
Leetump 2019-02-22 09:28:33
Which admin panel is best for school management system

I think sb admin 2 is perfect

Leetump 2019-02-22 10:19:46
Ahmed Magdi 2019-02-22 10:09:04
I think sb admin 2 is perfect

Can u send me link

htoowaikhant 2019-02-22 10:28:29
79423 2019-02-22 09:56:14
Htoo Wai did you use their API for uploading ?

i used vimeo direck link in my app. didn’t use for uploading.

Ahmed Magdi 2019-02-22 10:39:57
Ahmed Magdi 2019-02-22 10:09:04
I think sb admin 2 is perfect

https://www.google.com/url?sa=i&source=web&cd=&ved=2ahUKEwib0dPQ6s7gAhVGDewKHQAxBXkQzPwBegQIARAC&url=https%3A%2F%2Fusebootstrap.com%2Ftheme%2Fsb-admin-2&psig=AOvVaw2XePmm4gI6dm-kN8tKBL3R&ust=1550907454815931

prabhjd 2019-02-22 18:18:07
Hi guys
Which admin panel is best for the following
1)Inventory management
2)ecommerce website
3)cms
prabhjd 2019-02-22 18:19:40
Need recommendations
Joshteek 2019-02-22 20:23:12
rafael_santos90 2019-02-22 01:28:20
Hey guys, Laravel has an easy way to make different languages in the site?
Like translate the whole site do English/Spanish/Portuguese

Google already made that easy for everyone.

rafael_santos90 2019-02-22 20:24:08
Joshteek 2019-02-22 20:23:12
Google already made that easy for everyone.

Tell this to my boss xD

2019-02-22 21:58:08
Guys…How do u deal with validating user email while updating the user?
2019-02-22 21:59:30
I know that during user store, u can use the unique rule to make sure the email address isn’t already taken
2019-02-22 22:00:23
Yet when it comes to updating, u can’t necessarily use unique as that would prevent the user from using their old email.
2019-02-22 22:03:05
Ooohhh…I just checked the docs and saw that what I wanted had been there all along
2019-02-22 22:03:14
Thanks๐Ÿ‘
praneet81 2019-02-22 22:18:04
Hello all
Has anyone used laravel spatie permission package?
khalinxyz 2019-02-22 22:21:15
praneet81 2019-02-22 22:18:04
Hello all
Has anyone used laravel spatie permission package?

Hello. Ask your questions first. Conversation includes 700 developers.

praneet81 2019-02-22 22:22:13
I want to use php artisan tinker to put some roles in the roles table generated by the package
praneet81 2019-02-22 22:22:22
But I’m getting this error
praneet81 2019-02-22 22:22:28
laravel_discuss-2629.jpg

khalinxyz 2019-02-22 22:22:56
Use SpatieRole
khalinxyz 2019-02-22 22:23:12
Tinker can’t resolve package namespace automatically
praneet81 2019-02-22 22:24:00
So i should write new SpatieRole to create the instance???
khalinxyz 2019-02-22 22:24:27
You can use static methods like create or make
praneet81 2019-02-22 22:25:40
I don’t want to use that
praneet81 2019-02-22 22:25:47
Just yet
praneet81 2019-02-22 22:26:14
I guess I’ll just hard code roles in to my database
praneet81 2019-02-22 22:26:18
In roles table
khalinxyz 2019-02-22 22:26:28
SpatieRole::create([])
khalinxyz 2019-02-22 22:26:53
Or $role = new SpatieRole([])
praneet81 2019-02-22 22:27:09
khalinxyz 2019-02-22 22:26:28
SpatieRole::create([])

Within tinker? Sorry I’m a bit new in using tinker so pardon my noob questions

|