Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php

<?php namespace AppHttpControllers; use IlluminateHttpRequest; class ProductsController  extends Controller{    public function index() {        $title = "Welcome to my Laravel 8 course";        $description = "Created by Dary";         $data = [            'productOne' => 'iPhone',            'productTwo' => 'Samsung'        ];         //Compact method        //return view('products.index',        // compact('title', 'description));         //with method        //return view('products.index')->with('title', $title);       //Directly in the view       return view('products.index', [        ]);    }     public function about() {
            
Source by www.hostwinds.com #
 
PREVIOUS NEXT
Tagged: #php
ADD COMMENT
Topic
Name
6+8 =