Tag Archives: laravel

Displaying custom error when sending Laravel email

Questions: The code below works perfectly when the provided email in the second send function is correct $cm1[’email’], however, when the user enters a not working email Laravel error page is displayed and the condition I wrote that redirect(‘/cm’) with the error message doesn’t work. So my question is how to make Laravel redirect the… Read More »

Laravel api call does fails

Questions: So I asked this question in larachat and searched in google. I know that similar questions have been asked before but none of them worked for me. I’m trying to load the comment’s of a post but the request doesn’t even get to the api.php here is the request I do: axios.get(`/api/posts/${this.post.id}/comments`) and than… Read More »

Debugging Laravel application on VSCode

Questions: Has anyone successfully configured VSCode to debug Laravel-based website? After having followed numerous articles and tutorials, I have made it to the point where I can ask VSCode to “Listen to XDEBUG”, but I haven’t been able to do normal VS-style debugging where I could just hit F5 to launch current the website in… Read More »

Laravel 5.6 Event Broadcasting

Questions: How to implement event broadcasting without pusher? I use presence channels and my Api uses laravel passport. And i set BROADCAST_DRIVER=redis Can I like the laravel echo server to use without laravel echo on the client because my clients are ios / android applications on the web part I test id but not work… Read More »

when I use foreach in laravel's blade, last() or end() not working

Questions: end() or last() are not working…What to do? @foreach($students as $student) @foreach($payment_heads as $payment_head) <td> @foreach ($student->payment_detail as $payment_detail_one) @if($payment_detail_one->payment_head_id==$payment_head->id) <?php $total=$total+$payment_detail_one->amount; ?> @if($payment_detail_one === end($$student->payment_detail)) {{$payment_detail_one->amount}} @endif @endif @endforeach </td> @endforeach @endforeach Answers:

how to use different forms in one blade file in laravel 5.6

Questions: I am using laravel 5.6 and I am developing auto classifieds web application. in My app I have 3 different vehicle categories as car, van, truck and I have blade file to select this three different vehicle types. when I select this vehicles my urls show like this, http://localhost:8000/post-ad/Truck/8 <- this is category id… Read More »

Laravel 4.2: Force URL to be rendered as HTTP or HTTPS

Questions: We have a simple route defined like the following one: Route // Home Route::get(‘/home’, [ ‘as’ => ‘home::index’, ‘uses’ => ‘IndexController@home’ ]); View <a href=”{{ route(‘home::index’) }}”>Home</a> We need to force our link/route in view rendered as HTTP or in some cases as HTTPS route e.g. http://host.domain/home or https://host.domain/home. We cannot use URL::forceSchema(“http”) or… Read More »

Laravel call helper

Questions: i have some problems with calling helpers in Laravel. I have blade, and this code in it @foreach ($sel->get_offers() as $o) <option value=”{{$o->get_date_range()->get_range()}}” {{($o->get_offer_key() == $u_key)? ‘selected’: ”}}> @php $select = $o->get_date_range()->get_start(‘j M D’); $change = str_replace([“Mon”, “Tue”, “Wed”, “Thu”, “Fri”, “Sat”, “Sun”, “Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”, “Jul”, “Aug”, “Sep”, “Oct”, “Nov”,… Read More »