Category : Uncategorised

How can I achieve this output (image below). This is my Types Table. and this is my Accounts Table. This is my Type Model. public function accounts() { return $this->hasMany(‘AppAccounts’); } This is my Account Model. public function type() { return $this->belongsTo(‘AppType’, ‘type_id’); } What I want to do is, I want to group the ..

Read more

I have these routes in web.php Route::get(‘/book/{book}’, [email protected]); Route::get(‘/user/{user}’, [email protected]); Route::get(‘/{category}’, [email protected]); I want to hide book and user from url using htaccess as long as they can’t be removed in routes. I tried this in both /.htaccess and in /public/.htaccess but none have worked RewriteEngine on RedirectMatch 301 /book/(.*) /$1 RewriteEngine on RewriteRule ^/book/(.+)$ ..

Read more

my task is to use here and get a map like this https://dawa.center/islamic_centers but I tried to use here cluster it does not make the same job like this example. I can not handle click event to zoom if click on cluster there is any suggestion to solve this problem. Source: Laravel 5..

Read more

below query is working in mysql SELECT cl.Title, p.Title as ParentTitle,cd.Trainer, day(cd.StartingDate) as day, day(cd.EndingDate) as day_end, MONTH(cd.StartingDate) as month, year(cd.EndingDate) as year, cd.StartingDate, cd.EndingDate, cd.Duration,cd.Type, cd.Fee, cd.Venue, count(s.Id) as total_registartion from CourseListNew cl left join CourseListNew p on p.Id=cl.ParentId join CourseDetailsNew cd on cl.Id = cd.CourseId left outer join Student s on cl.Id = ..

Read more

I am using Language switch to switch between English and Arabic.It is working fine in all the links except Home page. 1)If I have not authenticated it is working fine it is redirecting to http://domain.name/en/login 2)If I have auntenticated or logged in and try to access the url http://domain.name/ it is redirecting to http://domain.name/home instead ..

Read more

I am trying to use orderBy in my query, but its not working , $price contain ‘asc’ and ‘desc’ value after submitting form, but same value is showing in my blade. After click price (high to low) I want to show Product with high to low prices. Thanks Advance return Listing_property::latest() ->when($city, function ($query, $city) ..

Read more

The error below is the stack trace which is being logged to the laravel storage log every minute. [2020-09-25 19:51:40] local.ERROR: Uncaught Error: Class ‘Arr’ not found in Command line code:1 Stack trace: #0 {main} thrown {"exception":"[object] (SymfonyComponentDebugExceptionFatalErrorException(code: 1): Uncaught Error: Class ‘Arr’ not found in Command line code:1 Stack trace: #0 {main} thrown at ..

Read more

I’m trying to extend an existing application without modifying its source code. The application has a named route called wizard-add. Is there a way to register MyPackageMyMiddleware with the existing route? I tried attaching it via Route::getRoutes()->getByName(‘wizard-add’)->middleware(MyPackageMyMiddleware::class); but since packages are registered before the routes are read, Route::getRoutes() returns an empty collection. Thank you! Source: ..

Read more

I am having an issue with language switcher, when trying to execute a route with more than one parameter I get following error message Missing required parameters for [Route: client.edit] [URI: {language}/client/{id}/edit]. in the header having an switcher code Route::currentRouteName() <ul class="dropdown-menu" role="menu"> <li><a href="{{ route(Route::currentRouteName(),’en’) }}">EN</a></li> <li class="divider"></li> <li><a href="{{ route(Route::currentRouteName(),’ar’) }}">AR</a></li> </ul> Source: ..

Read more

I’m using ec2 linux Instance for hosting a laravel app. I’m using apache 2.4.i’m trying to setup 2 app with different domain on the same instance. I have tried almost everyting but it doesn’t seem to be working I created hosts.conf file under /etc/httpd/conf.d/ If I use this as content : DocumentRoot "/var/www/html/site1/public/" <Directory "/var/www/html/site1/public"> ..

Read more

I’m using EC2 Linux Instance for hosting a laravel app. I’m using apache 2.4. I’m trying to setup 2 apps with different domain on the same instance. I have tried almost everything but it doesn’t seem to be working. I created hosts.conf file under /etc/httpd/conf.d/. If I use this as content : DocumentRoot "/var/www/html/site1/public/" <Directory ..

Read more

I have the following 2 projects Project1) /var/www/html/laravel58/public Project2) /var/www/html/vue2/dist Project1 (Laravel) is currently configured on my domain http//www.domain.com How to configure VueJs Project2 (VueJs) as http//www.domain.com/panel/login The current apache config is as under <VirtualHost *:80> ServerName domain.com ServerAdmin a[email protected] DocumentRoot /var/www/html/laravel58/public ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory /var/www/html/laravel58/public/> Options Indexes FollowSymLinks MultiViews AllowOverride All ..

Read more

I am facing some issues when passing a variable to my view with an image path. When I trying to use this to get the image path <img class="img-responsive" src="{{ $dat[‘_embedded’][‘wp:featuredmedia’][‘0’][‘source_url’] }}" alt=""> I get this error Undefined index: wp:featuredmedia (View: /Users/sam/Documents/development/shop/resources/views/landing-page.blade.php) When I use only {{ $dat[‘_embedded’][‘wp:featuredmedia’][‘0’][‘source_url’] }} I get the correct path to ..

Read more

I have incorporated the following code in my contact.php file but it’s not working on the website. When you click on SEND MESSAGE nothing happens. Please tell me where I am making mistake. <?php $to = "[email protected]"; $from = $_REQUEST[’email’]; $name = $_REQUEST[‘name’]; $subject = $_REQUEST[‘subject’]; $number = $_REQUEST[‘number’]; $cmessage = $_REQUEST[‘message’]; $headers = "From: ..

Read more