Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Argument 2 passed to form_input() must be of the type string, null given
Post: RE: Argument 2 passed to form_input() must be of t...

If the Document is an instance of an Entity, then it seems to me that it would be better to define a default value. PHP Code: -- protected $attributes = ['title' => '']; --
64 Views
4 Replies
3 hours ago
iRedds
    Thread: Database Migration
Post: RE: Database Migration

There is currently a problem with the default value. The key only supports a string value. You can define a database field as a string. Passing strings as fields (https://codeigniter.com/user_guide/d...
92 Views
6 Replies
10 hours ago
iRedds
    Thread: Argument 2 passed to form_input() must be of the type string, null given
Post: RE: Argument 2 passed to form_input() must be of t...

The old() function returned null, while the form_input() function expects a string. Actually it is written in the text of an error. The old() function returns null if no value is found and no default ...
64 Views
4 Replies
Yesterday, 06:54 PM
iRedds
    Thread: Why request doesn't work with slash in the end of URL
Post: RE: Why request doesn't work with slash in the end...

Are you by any chance using Postman for testing?
94 Views
3 Replies
Yesterday, 11:04 AM
iRedds
    Thread: Accessing a model in a much used helper
Post: RE: Accessing a model in a much used helper

You can use the model() function to work with a single instance of a model class.
98 Views
2 Replies
Yesterday, 10:59 AM
iRedds
    Thread: Call to undefined function CodeIgniter\Test\helper() for CIUnitTestCase
Post: RE: Call to undefined function CodeIgniter\Test\he...

The call method is defined in the CodeIgniter\Test\FeatureTestTrait trait but you didn't add it.
354 Views
3 Replies
01-20-2022, 09:11 AM
iRedds
    Thread: Using the built-in pagination functions
Post: RE: Using the built-in pagination functions

The Model::paginate() method uses the Model and QueryBuilder methods to retrieve data. PHP Code: -- $model = new \App\Models\UserModel(); $model->paginate(10); // calls inside $model->findAll(10)...
127 Views
6 Replies
01-20-2022, 07:38 AM
iRedds
    Thread: RESTful resource handling and delete: controller method not found
Post: RE: RESTful resource handling and delete: controll...

You can use websafe parameter in resource method Resource routes (https://codeigniter.com/user_guide/incoming/restful.html#resource-routes) PHP Code: -- $routes->resource('photos', ['websafe' =...
150 Views
4 Replies
01-20-2022, 07:06 AM
iRedds
    Thread: Do you have any tips for the best way to structure partial views?
Post: RE: Do you have any tips for the best way to struc...

Views/parent.php PHP Code: -- Child: -- Views/child-a.php PHP Code: -- AAAAAAA -- Views/child-b.php PHP Code: -- BBBBBBB -- Now PHP Code: -- view('child-a...
145 Views
3 Replies
01-18-2022, 06:33 AM
iRedds
    Thread: validacion json
Post: RE: validacion json

Setting the Output (https://codeigniter.com/user_guide/outgoing/response.html#setting-the-output)
159 Views
2 Replies
01-18-2022, 06:15 AM
iRedds
    Thread: Apply Filter to Route
Post: RE: Apply Filter to Route

Add options to the route ['filter' => 'csrf']
138 Views
2 Replies
01-13-2022, 04:19 PM
iRedds
    Thread: Problem with cyrilic encription in URL
Post: RE: Problem with cyrilic encription in URL

The backtrace shows that the controller has been called. So there are no problems with the URL.
188 Views
4 Replies
01-13-2022, 04:15 PM
iRedds
    Thread: logging db actions via model events and id problem
Post: RE: logging db actions via model events and id pro...

First you need to extend the Model or use a trait by implementing the where() method. 1. The method must save all conditions. 2. The method will have to call the parent __call method in order for it...
322 Views
5 Replies
01-13-2022, 11:59 AM
iRedds
    Thread: Need suggestion on "Call to a member function save() on null"
Post: RE: Need suggestion on "Call to a member function ...

Does the model exist? Is the namespace correct? The model() function returns NULL only if the model class is not found.
141 Views
3 Replies
01-13-2022, 11:33 AM
iRedds
    Thread: Problem with cyrilic encription in URL
Post: RE: Problem with cyrilic encription in URL

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\[email protected]';
188 Views
4 Replies
01-13-2022, 11:22 AM
iRedds
    Thread: Model in subfolder not working
Post: RE: Model in subfolder not working

188 Views
2 Replies
01-12-2022, 01:36 PM
iRedds
    Thread: CoinpaymentsAPI
Post: RE: CoinpaymentsAPI

PHP Code: -- use App\Libraries\coinpayments\src\CoinpaymentsAPI; -- This means that the class not only needs to be in this path, but also has a corresponding namespace. It looks like you are usi...
216 Views
2 Replies
01-12-2022, 12:24 AM
iRedds
    Thread: Update using WHERE
Post: RE: Update using WHERE

https://codeigniter.com/user_guide/models/model.html#saving-data
402 Views
13 Replies
01-11-2022, 02:47 PM
iRedds
    Thread: API Route not wokring
Post: RE: API Route not wokring

@"InsiteFX" gave a good link, but you probably read it inattentively. Any CORS response must contain the "Access-Control-Allow-Origin" header. Your CorsFilter should look like this. PHP Code: -- p...
678 Views
6 Replies
01-10-2022, 05:39 AM
iRedds
    Thread: Filter to custom error pages
Post: RE: Filter to custom error pages

You are expecting a message, but you are not sending it. Therefore, you get the default message. PHP Code: -- return Services::response()->setStatusCode(405)->setBody('Not allowed'); --
227 Views
3 Replies
01-09-2022, 11:13 PM
iRedds

Theme © iAndrew 2016 - Forum software by © MyBB