Laravel redirect issue for android(kodular) - php

I'm building the mobile application of my laravel project for the profile part {{ __('main.nav_profile') }} This is how I do the redirect. But android button redirect asks for URL and so redirection fails. How can I solve this.
Picture : https://www.hizliresim.com/ml27x74
For example, there is no problem with others.
site.com/favorites and site.com/settings/edit
{{ __('main.nav_saved') }}
<div class="dropdown-divider"></div>
{{ __('main.nav_account') }}

Related

Passing a user id in a url in laravel

I'm making a Laravel web application, in this application, I have an Account Settings page. On this page, I want to display all the orders the user has made. In order to do this, I have to get the User id from the URL.
I tried passing the User id thru the URL by putting the Auth::user()->id in the route that leads to the page. however, this is giving me a 404 not found error.
This is the link that should pass the ID in the URL.
<a class="dropdown-item" href="{{ route('account/{{ Auth::user()->id }}') }}">
{{ __('Account Settings') }}
</a>
I also tried to change my web.php file but that's also not giving any result.
I really would appreciate some help with my problem since I've been stuck on this all day.
You're using Laravel route helper. the route would work only for NAMED ROUTE,
for example:
Route::get('account/{userId}', 'AccountController#show')->name('account');
Then, your could should be:
<a class="dropdown-item" href="{{ route('account', ['userId' => Auth::id()]) }}">
{{ __('Account Settings') }}
</a>

Content esclusion on some page

Hi all i will be needing an assistance. I have a navbar that all link on my app use but i will like to seclude a search form from some of the link in the app but am having difficulty doing that. This what i have tried on my nabvar so far example
Tried using route but no success
#if( (route('portfolio') &&(route('portfolio.details)
content here
#else
content
#endif
then i tried targeting the URI
#if( Request::is('/portfolio') &&(route('portfolio/details)
content here
#else
content
#endif
None seems to working.
I don't think you should be using the route helper method in your if statement. I think if you just do something like this, it should work.
#if (request()->is('portfolio'))
content
#else
content
#endif

Maddhatter Calendar view not being displayed

I'm trying to implement madhatter calendar in Laravel, but I do not see any calendar after implementing the code.
I guess the problem I face is in these lines
{!! $calendar_details->script() !!} {!! ($calendar_details->calendar()) !!}...
and when {{$calendar_details->script() }} {{ ($calendar_details->calendar()) }}... It gives me the following screenshot.
Does someone has solution for it?

Laravel 5.5: Blade forces https on external URLs

i'm displaying external Website Links from my Users in a Profile Page. The URL Format is: www.xyz.com. When i put a http:// before the {{ url }} Laravel changes the Protocoll automatically to https://. In the Result a lot of the Websites don't open properly. I set the APP_URL in the .env File to
https://domain because i want to use SSL in the App.
Laravel (Blade) is removing the http:// from the URL when i just want to print the Variable too. Even when i put http:// right in front the URL in the DB (MySQL) i still have the same problem.
All i do in the Controller is:
$user = \App\User::find($id);
After 2 days of research i'm reaching out to the community. Basically i'm searching for something like secure_url() inverse.
What i tried:
{{ url('http://'.$url) }}
{!! url('http://'.$url) !!}
{!! url(e('http://'.$url)) !!}
<a href="http://{{ $url }}">
{{ $url }}
Putting the Protocoll right in the DB
What do i not get here? Thank you for any help.
EDIT
Laravel does this only when i visit my site over https.
UPDATE & SOLUTION
It was the problem of the Laravel Cache Speed Package. I deactivated it and everything was back to normal. My fault, my bad.

List files in Dir using Pyro

I want to list all files in a directory Using PyroCMS.
Using the Files module each client has their own folder, the folder is their User ID
\files\clients\{ID}\
I need something like this.
{{ foreach file in { files:/clients/{{ user:id }} } }}
{{files:current_file_name}}
{{ endif }}
You should be able to do something like this...
{{ files:listing folder="/files/clients/{{ client_id }}" }}
Download {{ name }}
{{ /files:listing }}
You will need to set the client_id variable though. You could set it in your contoller and use:
$this->template
->set('client_id', $client_id)
->build('page-template-goes-here');
Or even use the current user with the tag:
{{ user:id }}
I haven't tested this, but you should be able to get something going.
From here:
http://docs.pyrocms.com/2.1/manual/index.php/modules-and-tags/tag-reference/files
http://docs.pyrocms.com/2.1/manual/index.php/modules-and-tags/tag-reference/user

Categories