Posts

Laravel using Cookies to Save URL Question Mark Parameter

Image
In Laravel most of the time cookies are set by the response .Further most of the posts does not directly tell how to retire URL Get  parameters. Eg: https://www.blogger.com/? blogID=1441573773987640178 To retrieve the value we can take the value in routes >>web.php Route::get('/', function(){      $term = Input::get(' blogID ');       if(isset($term)){         Cookie::queue(Cookie::make(' blogID ',$term, 60*24*365));       }     return view('home'); }); In here cookies are save using (Cookie::make) . In the next response the cookie value get saved in client browser.               e.g.  $cookie = Cookie :: make ( $name , $value , 60 ); http://laravel-recipes.com/recipes/48/creating-a-new-cookie To retrieve the Cookies value is simple       $request->cookie(' blogID ');

Laravel Customize Auth RegisterController Step By Step

Image
In Laravel Default RegisterController located in Auth/RegisterController can be customized to to meet another requirement. It use the user table of Laravel and not use any e.g. : send the account activation mail with other detail namespace App\Http\Controllers\Auth; use App\User; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Validator; use Illuminate\Foundation\Auth\RegistersUsers; class RegisterController extends Controller {     /*     |--------------------------------------------------------------------------     | Register Controller     |--------------------------------------------------------------------------     |     | This controller handles the registration of new users as well as their     | validation and creation. By default this controller uses a trait to     | provide this functionality without requiring any additional code.     |     */     use RegistersUsers;     /**      * Where to redirect users after registr

Comple Guilde on Setup Laravel Bitbucket clone

Image
Guide  https://laravel.com/docs/5.3/installation 1. sudo git clone https://kanchanainterlec@bitbucket.org/interlectivesg/bme_app.git 2. composer install 3.config debug true 4 .create .env mv .env.sample .env 5. php artisan key : generate   6.see error 7. Set permission :chmod -R 777 8.Set the database detail on .env file 9.  php artisan migrate : refresh run the application by moving to public

Remove MySql Strick Mode

Image
I have installed MySql in my Mac OSx using home brew. However when I was going to execute query like below it iilll gives a error Query : `comment_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', Error :  #1067 - Invalid default value for 'comment_date' The reason is My Sql has been installed in Strict mode Where User could not do some database actions ,which are prmiited in old version. This  article helps to remove strict mode permemtly as well as tempory  : http://nickbartlett.com/how- to-turn-off-mysql-strict-mode/ Simply run the query with following in the begin SET @@global.sql_mode= ”;

Google Adsense alternative for Sri Lankans

Hi, I found difficult to get Adsense to local content .However WP beginner post assist me a lot . http://www.wpbeginner.com/beginners-guide/make-money-online/?utm_source=retargeting&utm_medium=fbads#make-money-with-affiliate-marketing But there are others like amazon. One of good guide : https://www.wpsitecare.com/amazon-affiliate-wordpress/

Url encode decode anchor links with AngularJS PHP

Image
I had following link  in one of rest call which lead to SQL unexpected result due to & symbol. http://localhost/test/getDsv?$top=32&$skip=0&var=HR & Admin&com= Query has only considered  var=HR   only  which leads to unexpected results. My front end is anguler and I can encode the perticulter paramenter with  window . encodeURIComponent() Ref : http://stackoverflow.com/questions/11294107/how-can-i-send-the-ampersand-character-via-ajax To Decode it at PHP side there in nothing to do ,although there are lot of posts ,which indicate decoding. $this->_request['var']; http://stackoverflow.com/questions/11294107/how-can-i-send-the-ampersand-character-via-ajax

ICT AL - Dynamic and Static Web Pages

Image
Copyrights Goes to :https://web.facebook.com/alits.lk/?_rdc=1&_rdr