วันเสาร์ที่ 22 สิงหาคม พ.ศ. 2558

Laravel Media Manager

Laravel Media Manager 0.1.0 beta

This package is still under development.

Laravel 4 advanced media manager (file manager and uploader) package based on elFinder 2.1. Inspired by laravel-elfinder package developed by Barry vd. Heuvel. Note that this package is still under development. You can use this file manager in Laravel 4 as a standalone media manager or as a plugin for TinyMCE or CKEditor. For more info take a look at files in src/views folder.

Installation

First of all you should add laravel-media-manager package to your composer.json file using this line:
"ahmadazimi/laravel-media-manager": "dev-master",
Add the MediaManagerServiceProvider to your application providers by adding this line to providers array in app/config/app.php:
'W3G\MediaManager\MediaManagerServiceProvider',
To copy the Media Manager assets to the public folder, using the following artisan command:

composer update symfony/symfony

php artisan mediamanager:publish
Also remember to publish the assets after each update (or add the command to your post-update-cmd in composer.json)
You can now add the routes for elFinder to your routes.php
Route::group(array('before' => 'auth'), function()
    {
        \Route::get('media', 'W3G\MediaManager\MediaManagerController@showStandalone');
        \Route::any('media/connector', 'W3G\MediaManager\MediaManagerController@connector');
    });
Of course you can define your own filters/routes if you want.

Configuration

The default configuration requires a directory called 'media' in the public folder. You can change this by publishing the config file.
php artisan config:publish ahmadazimi/laravel-media-manager
In your app/config/packages/ahmadazimi/laravel-media-manager, you can change the default folder, the access callback or define your own roots and also some extra parameters for elFinder.

ref.
  • https://github.com/ahmadazimi/laravel-media-manager
  • http://symfony.com/blog/upgrading-your-symfony-projects-the-easy-way

วันอังคารที่ 4 สิงหาคม พ.ศ. 2558

วิธีทำให้ Laravel ติดต่อกับ MySql

วิธีทำให้ Laravel ติดต่อกับ MySql

1.สร้างฐานข้อมูล(Database)
2.คอนฟิกในการเชื่อมฐานข้อมูล จะถูกกำหนดอยู่ในไฟล์ app/config/database.php
3.รัน migrate เพื่อแก้ไขโครงสร้างฐานข้อมูล ด้วยคำสั่ง  php artisan migrate:make users เพื่อสร้างไฟล์ class ขึ้นมาไว้ในไดเร็กทอรี app/database/migrations/[current date]_users.php
4.แก้ไขไฟล์ app/database/migrations/[current date]_users.php
public function up()
{
Schema::create('users', function($table)
            {
                $table->increments('id');
                $table->string('first_name', 128);
                $table->string('last_name', 128);
                $table->string('email', 128);
  $table->timestamps();
            });
}
public function down()
{
Schema::drop('users');

}
5.รัน php artisan migrate อีกครั้งเพื่อสร้าง table users

ที่มา
http://spalinux.com/2015/01/laravel-connect-to-database
http://www.taroworldtaro.com/laravel-2-migrates-seeders/
http://ethaizone.com/blog/2012/10/%E0%B9%80%E0%B8%A3%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B8%95%E0%B9%89%E0%B8%99%E0%B8%81%E0%B8%B1%E0%B8%9A-laravel-migrations/

วันเสาร์ที่ 1 สิงหาคม พ.ศ. 2558

คำสั่งติดตั้ง lavavel 4.2 ด้วย composer

composer create-project laravel/laravel project-name ~4.2.0 --prefer-dist

เครื่องมือดีในการตรวจสอบเว็บไซต์ง่ายๆ มาให้นักพัฒนาเว็บไซต์

วันนี้มีเครื่องมือดีในการตรวจสอบเว็บไซต์ง่ายๆ มาให้นักพัฒนาเว็บไซต์ ผู้ดูแลเว็บไซต์ และผู้ที่สนใจ
ที่ช่วยดูว่า เว็บไซต์ที่เรามีอยู่ได้มาตรฐานหรือไม่ ซึ่งช่วยในการประกอบการทำเว็บไซต์ กำหนดทิศทาง หรือมีอะไรที่จะต้องปรับปรุง กันบ้าง เพื่อให้เว็บไซต์เราติดอันดับ มาลองดูกันครับ
http://validator.w3.org ใช้ตรวจสอบโครงสร้างของเอกสารว่าโครงสร้างได้มาตรฐานหรือไม่ ??
http://www.brokenlinkcheck.com ตรวจสอบว่าเว็บไซต์มีลิงค์ที่ตายอยู่หรือไม่ ??
http://www.thaiwebaccessibility.com/validator หรือhttp://wave.webaim.org ใช้ในการตรวจสอบเรื่องของมาตราฐาน ว่าหากได้ออกแบบรองรับการใช้งานตามรูปแบบ Universal Design หรือ Web Accessibility หรือไม่
https://jigsaw.w3.org/css-validator เพื่อใช้ตรวจสอบโครงสร้างการตกแต่งเว็บไซต์
http://serps.com/tools/rank_checker ลองตรวจสอบกันว่า Google ให้คะแนนเว็บไซต์ของเราอย่างไร
http://mobiletest.me ใช้ตรวจสอบว่าหากเข้าใช้งานด้วย Smart Device เช่น iPhone, Android, Windows Phone จะหน้าตาเป็นอย่างไร
http://www.siteworthtraffic.com ใช้ตรวจสอบดูมูลค่าเว็บไซต์ของคุณว่ามีมูลค่าจากโฆษณา ได้กี่ $ และมี Page View, Unique Visitor เท่าใด
http://www.seowebpageanalyzer.com ใช้ดูเรื่อง Search Engine Optimisation โดยจะสรุปข้อมูลที่จำเป็นสำหรับการทำ SEO
http://www.google.com/trends/ อันนี้ให้ใช้ในการวิเคราะห์ แนวโน้มของเนื้อหาของเว็บไซต์ หรือ เปรียบเทียบ โดยแนวโน้มของเรื่องราวว่ามีคนสนใจเรื่องนี้หรือไม่ อย่างไร?
น่าจะเป็นเครื่องมือที่มีประโยชน์ทุกท่าน เพื่อใช้ในการตรวจสอบเว็บไซต์ของเรากันนะครับ

ที่มา
https://www.facebook.com/groups/thaiwebaccessibility/?multi_permalinks=1105314679497914&notif_t=group_highlights