Codeigniter Tutorial for Beginners Step by Step | Model in Codeigniter

Codeigniter Tutorial for Beginners Step by Step | Model in Codeigniter

Solution Cone

7 лет назад

37,196 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@pooja5674
@pooja5674 - 14.08.2022 15:06

Hello. I am not able to understand how to open models/controllers etc file via xampp on localhost. The way you are doing using the port number is not working for me. Please help or share your contact number if possible. Thanks.

Ответить
@abhitutorials5443
@abhitutorials5443 - 01.10.2020 13:03

ur class is good., but i was getting some confusion while calss is going on

Ответить
@tcgames2769
@tcgames2769 - 29.04.2020 14:44

I was never ever clear on just how models fit into the MVC structure til now.
You've got a fantastic way of explaining things. Nice work!

Ответить
@ananyamahapatra6597
@ananyamahapatra6597 - 17.12.2019 15:36

Dear You have used "CI_model() " instead of "CI_model" for the class extension in the "Authentication_from_google" model, thats why error is there...

Thanks for the tutorial bdw😊

Ответить
@dominiqueeijansantos3232
@dominiqueeijansantos3232 - 08.10.2019 21:23

Can someone help me, the $lastName + $this->lastName();
return "Akshay ", $lastName; won't work on me, it say
Type: ParseError

Message: syntax error, unexpected ',', expecting ';'

Filename: C:\xampp\new\htdocs\CodeIgniter-3.1.2\application\models\My_model.php

Line Number: 5

Backtrace:

File: C:\xampp\new\htdocs\CodeIgniter-3.1.2\application\controllers\my_controller.php
Line: 13
Function: model

File: C:\xampp\new\htdocs\CodeIgniter-3.1.2\index.php
Line: 315
Function: require_once

Ответить
@RupamBumba
@RupamBumba - 15.09.2019 18:27

too much low volume

Ответить
@alparslan720
@alparslan720 - 20.08.2019 22:45

2 syntax erros on Authentication from google calss
line 2 remove () after CI_Model
line 10 remove }
tnx

Ответить
@ferdinandtugano
@ferdinandtugano - 10.02.2019 23:29

this is the most understandable CI tutorial I've ever watched! your series of tutorial. thank you so much! cheers from the Philippines.

Ответить
@inktwom
@inktwom - 04.01.2019 11:07

Found the Error of the last part of "authentication from google" part. This is the one in the video.

<?php
class Authentication_from_google CI_Model (){
public function userData(){
return "D";
}
}
?>


it has to be --->

<?php
class Authentication_from_google CI_Model {
public function userData(){
return "D";
}
}
?>

The error is you need to remove "( )" brackets after CI_Model. Then your code will work.
Thanks "Solution Cone" for the tutorials. keep it up. if you have run the code after you typed, you might have caught that at that spot. i'm a beginner to this and i took lot of time to figure it out. but, thanks anyway.

Ответить
@Dmkitservices
@Dmkitservices - 09.11.2018 09:51

what did i do wrong i get >?php class My_model extends CI_Model{ public function firstName(){ return "Mike"; } private function lastName(){ return "Aspinall"; } } ?> 
when i load the page
my code in My_controller is 
<?php
defined('BASEPATH') OR exit('No direct script access allowed');




class My_controller extends CI_Controller{

public function index()
{
$this->load->view('myindexview');
}
public function test()
{
$this->load->model('my_model');
$firstname = $this->my_model->firstname();

echo "Firstname => ", $firstname;

}

}
?>

Ответить
@vikramsuryawanshi4335
@vikramsuryawanshi4335 - 28.08.2018 17:00

you dont know how to access private value in controller please its request to you close channel you are not able to teach....

i report of channel

Ответить
@vikramsuryawanshi4335
@vikramsuryawanshi4335 - 28.08.2018 16:55

bakwas

Ответить
@ImranKhan-ec6jo
@ImranKhan-ec6jo - 28.08.2018 09:13

public function testing()
{
$this->load->model('autication_of_google','google');
$firstName = $this->google->firstName();
echo "firstname => ". $firstName;

}
sir you have use function" firstName()"
add these model create function"userdata()"
let me know use firstName function and what is echo first name

Ответить
@ktlnaysbl5624
@ktlnaysbl5624 - 14.08.2018 14:55

public function testing()
{
$this->load->model('my_model');
$firstName = $this->my_model->firstName();
echo "firstname => ". $firstName;

}

when i run this it only shows my firstname and not with this one "firstname =>" since i echo it it should be there right? please help me thanks

Ответить
@rohanmahajan1971
@rohanmahajan1971 - 13.05.2018 12:51

how much coding is required in Codeigniter??? I dont like much coding..

Ответить
@anuzpandey3326
@anuzpandey3326 - 23.12.2017 19:23

What are those Tuiiiiiiiiiiiiiiiiiiiiii Sounds
Anyways Nice Tuts.
Thank You!!!

Ответить
@rashedsami1959
@rashedsami1959 - 06.10.2017 06:51

the last one authenticaion part is not working for me
That shows an error:

A PHP Error was encountered

Severity: Error

Message: Call to undefined method Authenticate::firstName()

Filename: controllers/My_controller.php

Line Number: 16

Backtrace:

What to do???

Ответить
@1996killerbee
@1996killerbee - 31.07.2017 09:37

bhai ye bachon ka kuti cheeka to band krao peechay........

Ответить
@naganandhini4343
@naganandhini4343 - 10.07.2017 16:52

It's very clear explanation. tnk u very much sir.

Ответить
@rubyjane9202
@rubyjane9202 - 11.06.2017 14:12

Uncaught Exception was encountered when I tried to run the same

Ответить
@rajeshkannan2832
@rajeshkannan2832 - 03.05.2017 12:12

An uncaught Exception was encountered

Type: RuntimeException

Message: Unable to locate the model you have specified: Firstname

Filename: F:\xammp\htdocs\project\codeigniter\system\core\Loader.php

Line Number: 344

Backtrace:

File: F:\xammp\htdocs\project\codeigniter\application\controllers\My_controller.php
Line: 22
Function: model

File: F:\xammp\htdocs\project\codeigniter\index.php
Line: 315
Function: require_once

Ответить
@rajeshkannan2832
@rajeshkannan2832 - 03.05.2017 09:31

i follow the model class tutorial but not working properly please put correct vedio i'm using codeiginter 3.1.4

Ответить
@skygaikwad
@skygaikwad - 01.05.2017 15:48

isn't the function name in "google" method should me "userData()" instead of "firstName()"...........thanks for videos

Ответить
@ShahadatHossain-rn8is
@ShahadatHossain-rn8is - 15.04.2017 07:46

thank you.......i am going to tell you that "I m just following your video"
so keep uploading new video so that i can learn from you.....
you are just awesome ..........

Ответить
@bawasahil882
@bawasahil882 - 08.03.2017 15:17

Thnks for this tutorial........

Ответить