Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Pagination with URI segment
Post: RE: Pagination with URI segment

$model->paginate(5, 'default', null, 3); Set last parameter as segment number (test 2 or 3)
58 Views
1 Replies
Yesterday, 12:39 PM
ozornick
    Thread: supported locales (array) in .env
Post: RE: supported locales (array) in .env

There is a possibility, why not use it? at that moment I do not need notices, I excluded them from the list. I tried to make treshold.0 - didn't work
1,566 Views
6 Replies
08-12-2022, 09:43 PM
ozornick
    Thread: supported locales (array) in .env
Post: RE: supported locales (array) in .env

I also found this issue when setting Logger $threshold = [6,8,9] There is no solution for numbered, it seems to me But we can set up an associative array https://codeigniter4.github.io/CodeIgniter4/...
1,566 Views
6 Replies
08-12-2022, 10:13 AM
ozornick
    Thread: Manage Session folder
Post: RE: Manage Session folder

Create controller with run() method Write session_gc() in action Set task to cron: * * * * * wget -O http://site.com/cron/run
209 Views
7 Replies
08-09-2022, 12:39 AM
ozornick
    Thread: Session destroy randomly after redirection from PayU payment gateway redirection
Post: RE: Session destroy randomly after redirection fro...

https://forum.codeigniter.com/showthread.php?tid=82384 Use search about SameSite feature
143 Views
2 Replies
08-08-2022, 10:45 PM
ozornick
    Thread: Manage Session folder
Post: RE: Manage Session folder

Do not use manual removal. When switch to table storage, you need to generate new cleanup code. Set session.gc_probability or execute session_gc() in cron script. The function will work with tables ...
209 Views
7 Replies
08-08-2022, 10:39 PM
ozornick
    Thread: how to data in basecontroller.php pass to footer.php view codeigniter 4
Post: RE: how to data in basecontroller.php pass to foot...

Hmm. In CI 3 $this is "more global" as I recall. For your last example, the function should return something (object). PHP Code: -- // in my_function(), example return $this; -- I can’t gu...
235 Views
8 Replies
08-03-2022, 11:54 PM
ozornick
    Thread: how to data in basecontroller.php pass to footer.php view codeigniter 4
Post: RE: how to data in basecontroller.php pass to foot...

In what situation is the template called without a controller? If this is some private information output, it must be passed to the method. Do you have a working use case?
235 Views
8 Replies
08-03-2022, 11:22 PM
ozornick
    Thread: Design Pattern question: how to "merge" Entities and Models?
Post: RE: Design Pattern question: how to "merge" Entiti...

AdminModel contains fields from commonFields in the table? I didn’t quite understand the question, maybe it’s worth looking towards afterFind () to set values. Your version looks to be working.
113 Views
2 Replies
08-03-2022, 11:17 PM
ozornick
    Thread: how to data in basecontroller.php pass to footer.php view codeigniter 4
Post: RE: how to data in basecontroller.php pass to foot...

PHP Code: -- return view(”template", $this->data); // Send param in controller view --
235 Views
8 Replies
08-03-2022, 11:04 PM
ozornick
    Thread: app.baseurl or public $baseURL
Post: RE: app.baseurl or public $baseURL

I would advise you to specify Config\App.baseUrl in the .env file. Then the variable will be available directly via config("App.baseUrl") , not via getenv()
137 Views
3 Replies
08-03-2022, 10:59 PM
ozornick
    Thread: Codeigniter form validation for file
Post: RE: Codeigniter form validation for file

Need more information. Have you set the correct form format? enctype='multipart/form-data' Perhaps required is not suitable for file validation, use 'uploaded'
110 Views
1 Replies
08-03-2022, 12:28 AM
ozornick
    Thread: Inaccuracy? Edit Entity attributes
Post: RE: Inaccuracy? Edit Entity attributes

Yes, I know how to get fullName. The problem is to automatically assign a value to it when you find(). I also know about afterFind =)  I thought that it would become clearer when initialized in fi...
297 Views
6 Replies
07-31-2022, 05:39 AM
ozornick
    Thread: Inaccuracy? Edit Entity attributes
Post: RE: Inaccuracy? Edit Entity attributes

iRedds Wrote: (07-30-2022, 10:54 PM) -- Remove the 'date_birth' field from the $dates property. If you need to receive the Time object for this field, then specify $casts = ['date_birth' => 'datetim...
297 Views
6 Replies
07-30-2022, 11:22 PM
ozornick
    Thread: Inaccuracy? Edit Entity attributes
Post: RE: Inaccuracy? Edit Entity attributes

I see you have prepared a PR. It has not been accepted into the develop branch. I think, need to compare attributes using casting
297 Views
6 Replies
07-30-2022, 09:21 PM
ozornick
    Thread: Inaccuracy? Edit Entity attributes
Post: Inaccuracy? Edit Entity attributes

It's probably planned that way, but it doesn't seem right. When the entity is received by the model, a class is created and the setAttributes() method is called (Set raw data array without any mutati...
297 Views
6 Replies
07-29-2022, 12:44 PM
ozornick
    Thread: How Cancel The Delete in ‘’$useSoftDeletes = true‘’
Post: RE: How Cancel The Delete in ‘’$useSoftDeletes = t...

Yesterday I ran into this situation. If you set the entity $user->deletedAt = null, it may not be able to update the entry. It says "No data to update" The $user->hasChanged() method returns true. If ...
166 Views
2 Replies
07-27-2022, 11:28 PM
ozornick
    Thread: Filters & Helper Controller load
Post: RE: Filters & Helper Controller load

momox19 Wrote: (07-25-2022, 11:56 PM) -- Well, I solved my problem by using a library that does the different tests. And i call my library in my filter. In fact, in Codeigniter, I always have trou...
263 Views
6 Replies
07-26-2022, 10:39 PM
ozornick
    Thread: Generating multiple checkbox from database
Post: RE: Generating multiple checkbox from database

Use foreach. Set form method as GET. For edited fields use data in _GET or $settings['key'] default PHP Code: -- foreach ($settings as $k => $v) {     echo form_checkbox(...); // Here  set arra...
180 Views
2 Replies
07-26-2022, 10:24 PM
ozornick
    Thread: Add the correct HTML attributes to the form helper
Post: RE: Add the correct HTML attributes to the form he...

I had no experience in open source support  :rolleyes: If no one does it, I'll try it later
258 Views
2 Replies
07-16-2022, 10:09 PM
ozornick

Theme © iAndrew 2016 - Forum software by © MyBB