Search
 
SCRIPT & CODE EXAMPLE
 

PHP

subdomain in laravel and xampp



Update Locally : xamppapacheconfextrahttpd-vhosts.conf

<VirtualHost *:80>
    DocumentRoot "E:/xampp/htdocs/project_name/public"
    ServerName localhost
    ServerAlias *.localhost
    <Directory "E:/xampp/htdocs/project_name/public">
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
Then Try this routing

Route::group([
    'domain'    => '{office_name}.localhost'
],function(){
    Route::get('/', function () {
        return 'I AM OFFICE OWNER';
    });
});

Route::get('/', function () {
    return 'I AM SITE VISITOR';
});
Run with php artisan serv
Comment

PREVIOUS NEXT
Code Example
Php :: Woocommerce - Adding a Custom Endpoint 
Php :: sum row data and get all data eloquent laravel 
Php :: laravel collection put 
Php :: check if the request is ajax request in laravel 
Php :: woocommerce add to cart hook 
Php :: carbon previous day 
Php :: php extract last n words of string 
Php :: wordpress php query randomise 
Php :: next year php string 
Php :: str_ireplace 
Php :: laravel tree category 
Php :: wordpress php cpt get all taxonomy 
Php :: PHP sqrt() Function 
Php :: laravel query builder get data as array of array 
Php :: IlluminateContractsContainerBindingResolutionException target calss does not exist 
Php :: php do not refresh page after submit post 
Php :: laravel create project 
Php :: title tag wordpress 
Php :: Laravel: Validation unique on update 
Php :: php get file location 
Php :: codeigniter 3 update 
Php :: Filtering Eloquent collection data with filter 
Php :: php replace youtube embed url 
Php :: how to change php variable value in javascript 
Php :: how to start composer in laravel project on localhost 
Php :: name of today php 
Php :: laravel datepicker date format 
Php :: check if session is started 
Php :: reCAPTCHA v3 PHP 
Php :: use font awesome in laravel 8 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =