patriknemecek

Experience

2,330

1 Best Reply Awards

  • Member Since 5 Months Ago
  • 15 Lessons Completed
  • 0 Favorites

11th March, 2018

28th February, 2018

patriknemecek left a reply on Help On Eloquent Return Values • 5 months ago

Because this show you Model settings and other stuff. You use it normal, like

foreach($users as $user) {
   echo $user->name;
}

patriknemecek left a reply on How To Get All Route List? • 5 months ago

Try this Route::getRoutes();

patriknemecek left a reply on Passing Variables • 5 months ago

$this->functionName($variable);

patriknemecek left a reply on How To Get All Route List? • 5 months ago

Artisan::call($command, $params);
$output = Artisan::output();

23rd February, 2018

patriknemecek left a reply on Translation Namespace Problem • 5 months ago

Yes, still same effect and in views I use helper @lang()

22nd February, 2018

patriknemecek left a reply on I Need To Make Pagination For Episode Like Animy • 5 months ago

{{ $animes->links() }}

patriknemecek left a reply on Update Error - Creating Default Object From Empty Value • 5 months ago

If you call get(), it return list of objects, but not only one, for that you have to use first() or firstOrFail() and save() work fine.

try {
    $regType = RegistrationType::where('conference_id', $id)->firstOrFail();
    $regType->name = $request->registration_type_name;
        $regType->description = $request->registration_type_description;
} catch (\Exception $e) {
    return dump($e->getMessage());
}

patriknemecek left a reply on Profile User View • 5 months ago

Try this and rename view name

public function profile($countryCode, $username = null)
{
    // Check multi-countries site parameters
    if (!config('larapen.core.multiCountriesWebsite')) {
        $username = $countryCode;
    }

    // Get User
        
    $this->sUser = User::where('username', $username)->firstOrFail();
    return view('VIEW-NAME', [
    'user' => $this->sUser,
    'isUserSearch' => $this->isUserSearch
    ]);
}

patriknemecek started a new conversation Translation Namespace Problem • 5 months ago

Hello, I use nWidart/laravel-modules and my module admin register a translations with namespace admin, when I try in all ServiceProviders of enabled modules in boot function return dd(__('admin::nav.home')); I got translation value, but in Controllers and Views I got only admin::nav.home and I don't know where find this probably re-define of translate namespace

21st February, 2018

patriknemecek left a reply on Laravel 5.6: Parse Error: Syntax Error, Unexpected '?', Expecting Variable (T_VARIABLE) • 5 months ago

Yes you are absolutely right, I didn't thought my Apache2 use PHP 7.0

patriknemecek left a reply on Laravel 5.6: Parse Error: Syntax Error, Unexpected '?', Expecting Variable (T_VARIABLE) • 5 months ago

Yes, it is probably problem with PHP, now I tried fresh Laravel install and same error.

patriknemecek left a reply on Laravel 5.6: Parse Error: Syntax Error, Unexpected '?', Expecting Variable (T_VARIABLE) • 5 months ago

I use PHP 7.1.9, Laravel 5.6 requires PHP 7.1.3 or higher.

patriknemecek left a reply on Laravel 5.6: Parse Error: Syntax Error, Unexpected '?', Expecting Variable (T_VARIABLE) • 5 months ago

Output of "php artisan --version" is Laravel 5.6.4

patriknemecek started a new conversation Laravel 5.6: Parse Error: Syntax Error, Unexpected '?', Expecting Variable (T_VARIABLE) • 5 months ago

Hello, when I was solve problem with TrustedProxies, I got another error 500 with error message:

local.ERROR: Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) at vendor/symfony/routing/Route.php:53).

Before upgrade all works fine.

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.