Skip to content

Instantly share code, notes, and snippets.

View armanhakimsagar's full-sized avatar
🏸
Focusing

Arman Hakim Sagar armanhakimsagar

🏸
Focusing
View GitHub Profile
API SEARCH AJAX PROJECT :
1. api.php (fetch all data here & json encode)
header('Content-Type: application/json');
$connect = mysqli_connect("localhost", "root", "", "coo");
$sql = "SELECT * FROM apps_countries";
$result = mysqli_query($connect, $sql);
@armanhakimsagar
armanhakimsagar / PDO
Last active November 29, 2017 03:34
connection :
try {
$this->con = new PDO("mysql:host=$this->host;dbname=$this->databasename", $this->username, $this->password);
// set the PDO error mode to exception
$this->con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
https://github.com/anam-hossain/phpcart
1. composer require anam/phpcart
2. config/app.php
'Anam\Phpcart\CartServiceProvider'
1. RENAME TABLE old_name TO old_names;
2. php artisan make:model old_name
3. make image folder in public folder
-> INSERT
Laravel Collective (Forms & HTML pakage)
https://laravelcollective.com/docs/5.4/html
*. CMD :
composer require "laravelcollective/html":"^5.4.0"
* SINGLE AUTH :
*. avoid home.blade.php file auth+layouts folder
* Create Index by defaultStringLength :
https://laravel.com/docs/master/migrations#creating-indexes
Command line :
* composer (for check)
* shift + right click for cmd open
* cd C:\xampp\htdocs (Change directory same driver:
just cd then path)
* cd /d E:\full_bitopew (cd then /d the path change
CONFIGURATION :
-> Troubleshooting (config URI Protocol information) :
* confiq/confiq.php
* set base url (http://codeigniter/projectname)
* set index_page blank
@armanhakimsagar
armanhakimsagar / php crud
Created July 4, 2017 04:24
php oop crud
OOP VALIDATON INSERT :->
<?php
class webapps{
public $localhost ="localhost";
public $username = "root";
public $password = "";
public $database = "crud";