Categories
Mastering Development

Setting URL with logged in user id from the front end blade in LARAVEL 6

Hello I’m trying to set an URL (href) from my blade(welcome.blade.php) to logged in user’s user profile. My url has to be like this -> sample.com/profile/24 there, 24 is logged in user’s user id <a href=”‘)}}” class=”btn btn-primary”>profile</a> but when I run the code it gives me following exception, Facade\Ignition\Exceptions\ViewException syntax error, unexpected ‘}’, expecting […]

Categories
CMS Development Magento

Parse error: syntax error, unexpected ‘url’ (T_STRING), expecting ‘,’ or ‘;’

This is my code <div class=”gallery-placeholder _block-content-loading” data-gallery-role=”gallery-placeholder”> <?php /* @escapeNotVerified */ $json=$block->getGalleryImagesJson(); $array = json_decode($json,true); foreach($array as $item) { $imgurl = $item[‘full’]; echo ‘<img alt=”main product photo” class=”gallery-placeholder__image” “.$imgurl[‘url’]. “/>’; <br> } ?> </div> and I am getting error on this line echo ‘<img alt=”main product photo” class=”gallery-placeholder__image” “.$imgurl[‘url’]. “/>’; as Parse error: syntax […]

Categories
CMS Development Wordpress

Echo short code syntax

I want to make dynamic short code so insert php code of metabox text value to short code. I wrote this: <?php echo do_shortcode(“[svg-flag flag=\””.get_post_meta($post->ID, ‘ozellikler_text’, true);”.\”]”); ?> Error : Parse error: syntax error, unexpected ‘;’, expecting ‘,’ or ‘)’ in /home/deniztas/themeforest-deneme2.deniz-tasarim.site/wp-content/themes/html5blank-stable/my_homepages/right.php on line 14 I explain what I want step by step: There is […]

Categories
Development

Laravel join error while joining using model

I am trying to write a join between two tables. I have both tables as models and I am trying to join them. Here is what I have tried, Route::get(‘test’, function () { //order details $orders_details = OrderDetails:: where(‘SKU’,’LIKE’,’ROUTEINS%’) ->limit(10) ->join(‘[dbo].[Orders]’, ‘[dbo].[Orders].OrderNumber’, ‘=’, ‘31966862’ ->get(); return response()->json($orders); }); Error: Parse error: syntax error, unexpected ‘;’, […]

Categories
Development Linux

Empty string syntax inside vimrc defined via nix home-manager

I want to use home-manager to declare my vim configuration inside a nix-expression with the extraConfig option. I’m trying to run the example .vimrc configuration from coc.nvim and one line reads: set statusline^=%{coc#status()}%{get(b:,’coc_current_function’,”)} Inside a minimal home.nix I set it like this: { config, pkgs, … }: { # Let Home Manager install and manage […]

Categories
CMS Development Wordpress

PLESE THIS PHP CODING ERROR HOW TO SOLVE MY PROBLOM

PLESE THIS CODING HOW TO SOLVE MY PROBLOM. Parse error: syntax error, unexpected ‘if’ (T_IF), expecting ‘,’ or ‘)’ in /home2/nikithaonlin/public_html/wp-config.php on line 87

Categories
Development PHP

Getting error while declaring constant inside class using PHP

I am getting following error while declaring the constant using PHP. Error: A PHP Error was encountered Severity: Parsing Error Message: syntax error, unexpected ‘.’, expecting ‘,’ or ‘;’ Filename: libraries/SmsTemplateManager.php Line Number: 5 My code is below: SmsTemplateManager.php: class SmsTemplateManager { const STORE = APPPATH .”json/sms_api_template.json”; public $document; public function __construct() { $this->document = […]

Categories
Development

How to pass column names in selectExpr through one or more string parameters in spark using scala?

I am using script for CDC Merge in spark streaming. I wish to pass column values in selectExpr through a parameter as column names for each table would change. When I pass the columns and struct field through a string variable, I am getting error as ==> mismatched input ‘,’ expecting Below is the piece […]

Categories
Database Development

How to add multiple database strings in page title

I’m trying to create a dynamic page SEO title which differs from the @project.title To expand on the project title, in the page title I want to have project name, project category in project city. <%= content_for :page_title @project.name, @project.category, @project.city %> <%= content_for :meta_description, @project.description %> When running this i get the error syntax […]