How to create form in Laravel 4

Laravel 4 form create

Form is a most expected elements in website as well as web based application. Each and every interactive web apps must have a form option to communicate between users and administrator. Whatever you want to write in website, there is not alternative about form. It could be in chat, message, as well as comments.

In laravel 4, you have huge flexibility to create HTML form easily. Today I will gonna to show you how to create a simple form in laravel. Let’s open route.php file to change our routing.

Route::get('/createform', function()
{
return View::make('createform');
});

Just change the view file name and write new file name that is ‘createform’. Save and close this file. Open apps/views directory and create a new file. File name should createform.blade.php that we defined in route.php file.

<?php

{{ Form::open() }}

{{ Form::label(‘name’, ‘Full Name: ‘) }}

{{ Form::text(‘name’) }}

{{ Form::label(‘email’, ‘Email Address: ‘) }}

{{ Form::email(‘email’) }}

{{ Form::label(‘password’, ‘Password: ‘) }}

{{ Form::password(‘password’) }}

{{ Form::submit(‘Save Data’) }}

{{ Form::close() }}

Now save your file and browse your site (http://localhost/createform). Hope you will get very simple form that will take name, email and password. Its not fancy but still work.

Continue reading

Part 1: OOP by PHP: From Novice to Pro

This is a series of Object Oriented Programming based on PHP. Today I am going to show you the 1st part of this series. OOP in PHP was never been easy those comes from procedural method. This series will be delivered very smoothly that programmer can understand those comes from procedural practice. Hopefully you will enjoy it.

Thanks for watching.

How to fix, Error establishing a database connection in wordpress?

Sometime you may able to see the error message in your wordpress site that is ‘Error establishing a database connection’. If you are so lucky, then you will be see that, you can not access your wp-admin part due to the same reason. If you have experienced on it, definitely you are luck wp developer.  Anyways, lets see how to fix that kind of issues.

Wordpress Database connection error fix

Well, now first thing you have to do, log in your site via cpanel or ftp accounts. I am pretty sure that you have a that kinds of access authority if you are a real developer.

Continue reading

Part 1 : Installation Laravel :.: Mastering on Laravel

01 - Installation Laravel :.: Mastering on Laravel by tisuchi

Hello
I am planning to make video tutorial series for learning laravel from zero. Based on few request from my viewers, I am preparing few video tutorials for you. Today I am going to share first video tuts from laravel series. This video will help you to install laravel in your local computer. Its for installation laravel in your computer.

Hope you enjoyed this video. If you have any specific question, don’t forget to ask me by making comments. Thanks for watching.

Mastering on Routing in Laravel

Laravel Logo of tisuchi

Routing is important for every website as well as application. Today I am going tell about the mechanism of routing in web engineering. Basically routing will decide where will be your destination? In laravel, there is a special class for routing. Lets open app>routes.php files.

Route::get('/', function()
{
        return View::make('hello');
});


In this file, we are grabbing Route class from core Route class (vendor > laravel > framework > src > Illuminate > Routing > Route.php).  Inside the core Route class, there is a static get() function and we are by default using this get() function.  Inside this function, we laravel created a another function as a parameter.

function(){
       return View::make('hello');
}

Now, going inside this function, you will see there is a return option. But you have to understand how this function will work. Well, considering this function, I am going to comments the return option and put something new as follows-

Continue reading

Understanding PHP Regular Expression

PHP is mostly used scripting language in web world. Regular expression of PHP is one of the most important key to handle the form validation. This tutorial, I am going to discuss about the PHP regular expression.

 

PHP Regular Expression tisuchi.wordpress.com

 

 

 

 

 

Fundamentally, there are few symbols to identify the users input. The list are follows with the explanation.

Symbol             Explanation

^                       Start of string
                      End of string
.                        Any single character
+                       One or more character
\                        Escape Special characters
?                       Zero or more characters

 

Look exact matching of code with “abc”.

$express = /^abc$/;

Look for starting letters with “abc….”.

$express = /^abc/;

Check letters end with “abc”.

$express = /abc$/;

Check the abc input with one single characters “abcs”

$express = /^abc.$/;

Check the abc text with more then one characters like abcsy

$express = /^abc.+$/;

Passed any characters like abcstuvw123…

$express = /^abc.+?$/;

Continue reading

Remove index.php from codeigniter

Hello all
Today I am going to show you, how to remove the index.php part from your codeigniter URL. There are many ways to do it, but based on my previous experience, I got it is the best way to do so. To do so, create a .htaccess file in your directory and copy the following code in your created file.

 

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

 

Now, save this file and run your codeigniter apps. Hopefully, it will work perfectly.

Thanks for reading.