Tạo slug tự động bằng PHP/JavaScript
Tạo slug tự động bằng PHP code Nếu sử dụng code PHP thì thông thường giá trị của slug sẽ được tự động convert từ title của bài tin, như vậy ta sẽ cần một hàm để chuyển đổi đoạn…
Xem chi tiết
THINK. MAKE. LEARN.
Tạo slug tự động bằng PHP code Nếu sử dụng code PHP thì thông thường giá trị của slug sẽ được tự động convert từ title của bài tin, như vậy ta sẽ cần một hàm để chuyển đổi đoạn…
Xem chi tiếtGoogle bảo mật rất tốt, và rất khó có thể xâm nhập dữ liệu của nó, nếu làm được thì chỉ có sử dụng chính API của nó cung cấp. Tuy nhiên với Google Sheet thì nó có cung cấp…
Xem chi tiếtCách đơn giản nhất để bạn hiểu rõ hơn code của mình, như dưới đây nhé : $uaFull = strtolower($_SERVER['HTTP_USER_AGENT']); $uaStart = substr($uaFull, 0, 4); $uaPhone = [ '(android|bb\d+|meego).+mobile', 'avantgo', 'bada\/', 'blackberry', 'blazer', 'compal', 'elaine', 'fennec', 'hiptop', 'iemobile', 'ip(hone|od)', 'iris',…
Xem chi tiếtDefine Route Make Controller Make Model Make View 1.Define Route Route::get('posts', 'PostController@index'); Route::get('post-data', 'PostController@postData'); 2.Make Controller <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Post; class PostController extends Controller { function index() { return view('posts.index'); } function postData(Request $request) { if($request->ajax()) {…
Xem chi tiếtLaravel inline edit with X-editable Define Route Make Model Make Controller Make View 1. Define Route Route::get('contacts','ContactController@index'); Route::post('contacts/update','ContactController@update'); 2. Make Model Table (contacts), 3 fileds: id, name, phone <?php namespace App; use Illuminate\Database\Eloquent\Model; class Contact extends Model { public $timestamps…
Xem chi tiếtSử dụng filter image_send_to_editor để làm được điềnày function hdevvn_add_wrap_image($html, $id, $caption, $title, $align, $url, $size, $alt) { return '<div class="hdevvn_class">' . $html . '</div>'; } add_filter('image_send_to_editor', 'hdevvn_add_wrap_image', 10, 8);\
Xem chi tiết