I want to display metaimage when i share my link. But i am unable to get image. here is my code. please suggest me what is in my code. Iam new laravel. Answer Ref. : https://laravel.com/docs/5.7/helpers
Tag: laravel-5.2
Get count of unique values with the column name in Laravel 5.2 Collection
I am trying to get the number of unique Brands from my Products Table with their count from a Laravel collection. I was able to do that using a specific query for the products but the reason i’m using a collection now is because i also want to get the Product Origins (Country), Conditions (Used / New) of the products
How get a day with a carbon by German in Laravel?
How get a day with a carbon by German in Laravel? Try: Need: Answer Did you put this on bootstrap/app.php
How shall i concatenate two or more values/variables to a new variable in laravel
I am pretty much new to laravel(5.2), here i want to concatenate two values say first name and last name during user registration and save it to database, honestly as am new to this whole concept i have very little idea of doing it…it would be great if i could get some help…. User.php AuthController.php Answer if you want to
Laravel delete() static call
I got this error: Non-static method IlluminateDatabaseEloquentModel::delete() should not be called statically, assuming $this from incompatible context Here is the code in my controller: Can someone explain what I am doing wrong and how to call it correctly? Answer You have this: But you should be doing this:
Delete method with Sweet Alert in Laravel
I’m testing a method using Sweet Alert, to improve the messages issued by the Javascript alert method with the laravel framework. 1 – I downloaded the files sweetalert.css and sweetalert.min.js. 2 – So I connect the files from app.blade.php 3 – I created the delete button using the onclick event of Javascript and the following Sweet Alert function: 4 –
validating a numeric input’s length in laravel 5
foo.blade.php FooController.php the national-id field should contain 10 digits and I actually expected the code above to validate this , but instead It will check If the national-id exactly equals to 10 or not … how can I validate the length of a numeric field? Answer In fact you don’t need to use digits_between rule. You can use digits rule
laravel 5.2 How to get route parameter in blade?
this is my url http://project.dev/blogs/image-with-article so, here I need the parameter image-with-article in my blade to display which is a parameter named slug here is in my routes file I need the slug paramter in blade. Answer I’m not sure what you mean. If you’re trying to construct the route in a Blade template, use If you’re trying to access
Laravel Eloquent – get last insert of related model
I have a relationship between two models: Terminal and terminalRent. A Terminal can have many terminalRents. I want to get the last Rent for a specific Terminal. When using where() it will reflect those on the Modal hoewever I want to get the last record for terminalRent in relation to the specific terminal. $id is the Id of the terminal
Laravel Middleware / Route Groups
I’m fairly new to Laravel, so this question may obvious to some. In the case of running checks per HTTP request, for example User Authentication. Is there a better, more efficient or simple correct …